diff --git a/deps/mpg123/AUTHORS b/deps/mpg123/AUTHORS new file mode 100644 index 0000000..4e495b7 --- /dev/null +++ b/deps/mpg123/AUTHORS @@ -0,0 +1,150 @@ +This is an attempt to give credit to the people who contributed in some way to the mpg123 project. +There are names and email addresses listed. Please use these addresses only to contact contributors with some question about their mpg123 contribution. +You are explicitly not allowed to send them unwanted business offers or to question the quality of their sex life. +-------------------- + +Current maintainers with various sorts of contributions: + Thomas Orgis + Patrick Dehne + Jonathan Yong <10walls@gmail.com> + +Co-initiator of the revived mpg123 project, but not that involved anymore: + Nicholas J Humfrey + +Generic address pointing to the current maintainer (hopefully still works in future in case maintainership will change again): + +The creator: Michael Hipp (email: hippm@informatik.uni-tuebingen.de - please bother maintainers first) + +Contributions/ideas Thomas Orgis era (includes backports from mhipp trunk): + +Dan McGee : various patches (also for test suite) +Jonathan Yong (jon_y) <10walls@gmail.com>: win32 hacking +Malcolm Boczek : Common language runtime wrapper +Elbert Pol (TeLLie) : OS/2 port fixup +Jeroen Valkonet : motivate pitch control, suggestive patch for pitch command in generic control interface +Andy Hefner : patch for that second UTF16 issue +Taihei Monma : A whole lot of new/improved assembler code, including Altivec! +Christian Weisgerber , Brad Smith: sndio output +Patrick Dehne (P4tr3ck) : more MSVC++ porting, patch to handle missing bit reservoirs +Thorsten Glaser : icy2utf8, suggest utf8 locale stuff +Dan Smith : ABI fixes for ensuring stack alignment (esp. for MinGW-built DLL with MSVC) +Michael Ryzhykh : mpg123.spec.in +Stefan Lenselink : initial aRts output +Sergej Kvachonok : win32 audio rewrite +Winston: SunOS-4.1.4/gcc-2.7.0 testing and suggestions for fixes (legacy Makefile, integer type headers) +Mika Tiainen: pointing out the fix for the UTF to ASCII filtering of tags to actually work +Nick Kurshev : extended 3dnow (from mplayer) +Zuxy Meng : SSE (from mplayer) +Honza : idea and prototype patch for ICY meta data support +Petr Baudis : patches: term sigcont, id3 display unicode fallback and condensed output +Petr Salinger : i486 enhancement +mpdavig@users.sourceforge.net: linux-ppc-nas Makefile.legacy entry +Adrian Bacon : patched decode_i586_dither (noise shaped float/int rounding) +Cool Feet Audio project : realtime equalizer control +Steve Grundell : clean stdout in control mode with stdout decoding +Romain Dolbeau : Altivec support (taken from mplayer) +higway : MMX Patch +Clemens Ladisch : ALSA 0.9/1.0 support + +Debian Daniel Kobras era: + +Steve Kemp +Dan Olson +Syuuhei Kashiyama +Rupert Levene +Andreas Dilger +Erik B. Andersen +Chris Butler +Martin Sjogren +Chet Hosey +Roland Rosenfeld + + +Debian Colin Watson era: + +Helge Deller +Chet Hosey +Christopher C. Chimelis +Roland Rosenfeld +Marcelo E. Magallon + + +Initial Debianers: + +Tommi Virtanen +Paul Haggart + + +Contributions/ideas Michael Hipp era: + +Mikko Tommila: DCT9 +Oliver Fromme +MPEG Software Simulation Group: reference decoder package +Tobias Bading: idea for DCT64 in subband synthesis from maplay package +Jeff Tsay and Mikko Tommila: MDCT36 from maplay package +Philipp Knirsch : DCT36/manual unroll idea +Thomas Woerner: SGI Audio +Damien Clermonte: HP-UX audio fixes +Niclas Lindstrom : OS2 port +Stefan Bieschewski : Pentium optimizations, decode_i586.s +Martin Denn : NAS port +Niklas Beisert : MPEG 2.5 tables + and : NetBSD Patch(es) +Kevin Brintnall : BSD patch +Tony Million: win32 port +Steven Tiger Lang: advanced shuffle +Eric B. Mitchell: esd port +Ryan R. Prosser : esd port for Solaris +Andreas Neuhaus: initial generic control interface + +(additionally fetched from changelog:) + +Ralf Hildebrandt : audio_alib changes +: BSDOS 4.0 with gcc added to Makefile +Bertrand Petit : frontend changes +Erik Mouw : SGI audio fix for non RAD machines +Daniel O'Connor : freebsd-esd make-entry +D. Skarda <0rfelyus@atrey.karlin.mff.cuni.cz>: enhanced head_check +Wilson, Jeff D : xterm-title +Robert Bihlmeyer : esd changes +Hannu Napari's : SGI audio patches +: native AIX support +: playlist patch +Gilles Zunino : SGI audio patches +Matthew Parslow : esdserver patch +: equalizer patch (equalfile setting) +Ducroquet Erwan : HPUX/ALib support +Shane Wegner : genrepatch +Samuel Audet : wav-File patch +"J. Dean Brederson" : SGI-RAD support +Chou Ye-chi : sajberplay/FreeBSD patch +Fabrice Bellard : 486 optimizations +A. Hermansen and J. Kysela : ALSA output +KIMURA Takuhiro : K6-3DNow +Petr Stehlik : MINT +Andy : float2int speed up proposal +Brian Foutz : TK3Play +Thomas Niederreiter : RIFF header fix +Stefan Gybas : m68k patch +Grant Erickson : Linux PPC patch +Peter Berger : BSDi patch +Henrik P Johnson : HTTP auth +Steven Tiger Lang : advanced shuffle +"Brian J. Swetland" : front-end (remote) patch + +Tillmann Steinbrecher : shuffle patch +M.Stekelenburg : i386-getbits +Antti Andreimann : outburst patch +Hur TaeSung : 'http accept' patch + +(from post-0.59 changes that yet have to go into new trunk:) + +Hans Schwengeler : audio_dec additions +Wojciech Barański's Mp3Play (check the tools folder): Mp3Play frontend +Daniel Koukola: audio_oss.c patch +Munechika SUMIKAWA : IPv6 +TEMNOTA : HTTP,FTP patch/playlist fix +Peter Surda : VBR patch +Ben : ARM startup time improvements +Dave MacKenzie : init_output() patch +pasky's : close-on-stop patch diff --git a/deps/mpg123/COPYING b/deps/mpg123/COPYING new file mode 100644 index 0000000..cf361b2 --- /dev/null +++ b/deps/mpg123/COPYING @@ -0,0 +1,773 @@ +This is the file that contains the terms of use, copying, etc. for the mpg123 distribution package. + +Main message: + + Code is copyrighted by Michael Hipp, who made it free software under the terms of the LGPL 2.1. + +But that is not all of it. +mpg123 is licensed under the GNU General Lesser Public License, version 2.1, and in parts under the GNU General Public License, version 2. +That means that _all_ of mpg123 is licensed under GPL and the major part also under the LGPL. + +Actually, the "major part" currently is the whole distributed package of mpg123. There are some files (old alsa output, libao output) that you get from our svn repository and that do not fall under LGPL. + +When the copyright marker in a source file says "the mpg123 project" that means that the file contains code copyrighted by contributors to mpg123, the "initially written by" naming the person(s) that created the file and thus may have the largest part of copyrights on it. +I am explaining this here to emphasize that the copyright always actually lies by the individual member (i.e. contributor to) of the mpg123 project who wrote a specific section of code. +Usage of a source code management system like Subversion should provide keeping track of individual copyright traces... + +Please consider that any code that is contributed to the mpg123 project shall be licensed under LGPL 2.1 . +If you want to contribute, but don't agree to that (i.e. you want to have your code GPL only) please say so - then, we either you convince is to include your code under GPL, we convince you to make it LGPL instead or, as a last resort, you'll have to do you own GPLed fork. +But we should try to avoid the last option... + +All files in the distribution that don't carry a license note on their own are licensed under the terms of the LGPL 2.1; all files that do carry either a LGPL or GPL note are licensed respectively under the LGPL or GPL as follows: + + +======================= +1. The LGPL version 2.1 +======================= + + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, 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 + + +==================== +2. The GPL version 2 +==================== + + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS diff --git a/deps/mpg123/ChangeLog b/deps/mpg123/ChangeLog new file mode 100644 index 0000000..e8d40a1 --- /dev/null +++ b/deps/mpg123/ChangeLog @@ -0,0 +1,3 @@ +This is a dummy file. If you want to see the change log, use subversion: + + svn log -v svn://orgis.org/mpg123 diff --git a/deps/mpg123/INSTALL b/deps/mpg123/INSTALL new file mode 100644 index 0000000..c618eff --- /dev/null +++ b/deps/mpg123/INSTALL @@ -0,0 +1,111 @@ +mpg123 install hints +-------------------- + +(This file has very long lines - die-hard terminal nostalgists can be satisfied by `fmt -s -w 75 < INSTALL | less`. I think it's better to let the reader's preference rule than to preformat the stuff to some arbitrary width.) + + +0. Prerequesites + +You really need: + +- a C compiler; we try to keep the code ANSI C89/ISO C90 compatible + gcc from 2.95 on should work, others, too - please report any issues + Actually, we have a confirmed working build (svn trunk leading to release 0.67) on SunOS 4.1.4 with gcc-2.7.0 . + +- an (UNIX-like) operating system with standard tools; MinGW32 and Cygwin are working for Microsoft Windows, too. We also have users happily on OS/2. +- For the library only, you may get lucky with MSVC++ using the project files under ports/ +- For other exotic platforms, also see ports/ +- If building from direct SCM checkout, you need GNU autotools installed (see below). + +You want: + +- working assembler (recent GNU binutils) if using certain CPU optimizations +- headers and lib for certain audio output drivers (libasound for alsa, sdl for sdl...) +- libtool's libltdl for runtime output modules (this used to be included, but now we rely on an existing install) + + +1. Build + +There is one main supported way to get your mpg123 installation consisting of + + a) the mpg123 binary file + - with libmpg123 as shared library or statically linked + - with audio output plugins, or one statically linked + b) a man page + +(you may want to copy some of the documentation - README, etc - to /usr/share/doc/mpg123 or the like, too) + +This way is the usual GNU 3-step procedure: + + ./configure + make + make install + +Run + + ./configure --help + +for a list of possible parameters you can specify in the configuration step. The obvious are --prefix and the normal GNU autotool bunch, but others include what audio subsystem to use and what CPU optimizations to build in. +For the optimizations (decoder choice), the default is a build that combines all usable optimizations for the platform and chooses one at runtime (see --cpu, --list-cpu and --test-cpu parameters). + +There are various parameters you can tune, but of course the defaults are what is mainly tested. + +Also, various library features can be left out via --disable options (like output formats, resampling modes). That way, you can strive for a minimal build that only does what you really need. Not every combination of library features is tested regularily, so you might hit some speed bumps, but usually stuff that is easily worked out (at least for the mpg123 team when you report it). + +An example (working on mpg123 trunk r3062): + + CFLAGS="-Os -s" ./configure --with-cpu=generic --disable-id3v2 --disable-lfs-alias --disable-feature-report --with-seektable=0 --disable-16bit --disable-32bit --disable-8bit --disable-messages --disable-feeder --disable-ntom --disable-downsample --disable-icy && make + +That, and further application of `strip --strip-unneeded`, yields a lean 93 KiB shared library for MPEG layer I/II/III decoding to floating point on my x86-64 system (it should be a bit smaller on 32 bit systems). When disabling layers I and II, too, that goes down to 81 KiB. + +The shared library of a full build weighs 170 KiB after stripping. + + +2. Developer build + +This project uses GNU autotools (no specific version, but they should be fairly recent), also libtool. You need to have those installed, as it is usually the case for build environments based on the GNU toolchain. + +One a fresh SCM checkout, or after changing things in configure.ac, you need to run + + autoreconf -iv + +to prepare the configure script. Then you can build as per point 1. + + +3. Library-only build + +If you do not want to build the whole thing, but only the library, run + + ./configure + cd src/libmpg123 + make + +You can then find the library itself under src/libmpg123/.libs (libtool likes to hide things there). + + +4. Exotic platforms + +See the ports/ directory for some help for building at least libmpg123 without the UNIX shell / autotools. The main strategy is to write a config.h to replace what configure would generate and then have a correct listing of all source files involved in that configuration (there are optional files for different decoder choices, for example). + +Then compile objects, link. + + +4a. Preparing Win32 binary packages. + +Caution: You should make sure to use some gcc >= 4.2.0, even if it's still the experimental package for MinGW32. +This helps preventing incompatibilities between generated DLL files and other compilers (it's about stack alignment). + +Get MinGW/MSYS installed, run the MSYS shell. +Enter the mpg123 source directory. +Execute sh ./windows-builds.sh . + +After some time, you should have some relevant files under releases/ (or releases\, for Windows people;-). +You don't just get one build -- there are several variants, corresponding to what usually is to be found under http://mpg123.org/download/win32 . + + +5. Note on large file support + +The libmpg123 API includes the generic off_t type for file offsets and thus is subject to shape-shifting on systems that change off_t depending on build flags. +To deal with the incompatibilities that can cause, the library needs to separate code paths for small and large off_t. +Since version 1.12.0, a large-file-enabled libmpg123 (the default set by configure) provides a dual-mode ABI. Depending on _FILE_OFFSET_BITS, the mpg123.h header file selects different library symbols to use for your app. +In both large-file and normal mode, the library should just work for your app. diff --git a/deps/mpg123/Makefile.am b/deps/mpg123/Makefile.am new file mode 100644 index 0000000..a837ffa --- /dev/null +++ b/deps/mpg123/Makefile.am @@ -0,0 +1,99 @@ +## Makefile.am: produce Makefile.in from this + +## copyright by the mpg123 project - free software under the terms of the LGPL 2.1 +## see COPYING and AUTHORS files in distribution or http://mpg123.org +## initially written by Nicholas J. Humfrey +dist_man_MANS = man1/mpg123.1 + +SUBDIRS = src doc +DIST_SUBDIRS = src doc +ACLOCAL_AMFLAGS = -I m4 + +# pkg-config file for the mpg123 library +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libmpg123.pc + +# mpg123.spec is autogenerated but needs to be present in tarball! +EXTRA_DIST = \ + mpg123.spec \ + makedll.sh \ + windows-builds.sh \ + equalize.dat \ + NEWS.libmpg123 \ + ports/MSVC++/mpg123.h \ + ports/MSVC++/config.h \ + ports/MSVC++/msvc.c \ + ports/MSVC++/examples/scan.c \ + ports/MSVC++/examples/feedseek.c \ + ports/MSVC++/2005/libmpg123/libmpg123.vcproj \ + ports/MSVC++/2008/mpg123.sln \ + ports/MSVC++/2008/feedseek/feedseek.vcproj \ + ports/MSVC++/2008/mpglib/mpglib.vcproj \ + ports/MSVC++/2008/libmpg123/libmpg123.vcproj \ + ports/MSVC++/2008/scan/scan.vcproj \ + ports/MSVC++/2008/dump_seekindex/dump_seekindex.vcproj \ + ports/MSVC++/2008clr/2008clr.sln \ + ports/MSVC++/2008clr/mpg123clr/advanced.cpp \ + ports/MSVC++/2008clr/mpg123clr/advanced.h \ + ports/MSVC++/2008clr/mpg123clr/AssemblyInfo.cpp \ + ports/MSVC++/2008clr/mpg123clr/dllmain.cpp \ + ports/MSVC++/2008clr/mpg123clr/enum.h \ + ports/MSVC++/2008clr/mpg123clr/error.cpp \ + ports/MSVC++/2008clr/mpg123clr/error.h \ + ports/MSVC++/2008clr/mpg123clr/id3v1.cpp \ + ports/MSVC++/2008clr/mpg123clr/id3v1.h \ + ports/MSVC++/2008clr/mpg123clr/id3v2.cpp \ + ports/MSVC++/2008clr/mpg123clr/id3v2.h \ + ports/MSVC++/2008clr/mpg123clr/mpg123clr.cpp \ + ports/MSVC++/2008clr/mpg123clr/mpg123clr.h \ + ports/MSVC++/2008clr/mpg123clr/mpg123clr.rc \ + ports/MSVC++/2008clr/mpg123clr/mpg123clr.vcproj \ + ports/MSVC++/2008clr/mpg123clr/ReadMe.txt \ + ports/MSVC++/2008clr/mpg123clr/resource.h \ + ports/MSVC++/2008clr/mpg123clr/stdafx.cpp \ + ports/MSVC++/2008clr/mpg123clr/stdafx.h \ + ports/MSVC++/2008clr/mpg123clr/string.cpp \ + ports/MSVC++/2008clr/mpg123clr/string.h \ + ports/MSVC++/2008clr/mpg123clr/targetver.h \ + ports/MSVC++/2008clr/mpg123clr/text.cpp \ + ports/MSVC++/2008clr/mpg123clr/text.h \ + ports/MSVC++/2008clr/examples/feedseekclr/feedseekclr.csproj \ + ports/MSVC++/2008clr/examples/feedseekclr/Program.cs \ + ports/MSVC++/2008clr/examples/feedseekclr/Properties/AssemblyInfo.cs \ + ports/MSVC++/2008clr/examples/ReplaceReaderclr/ReplaceReaderclr.csproj \ + ports/MSVC++/2008clr/examples/ReplaceReaderclr/Program.cs \ + ports/MSVC++/2008clr/examples/ReplaceReaderclr/Properties/AssemblyInfo.cs \ + ports/MSVC++/2008clr/examples/scanclr/scanclr.csproj \ + ports/MSVC++/2008clr/examples/scanclr/Program.cs \ + ports/MSVC++/2008clr/examples/scanclr/Properties/AssemblyInfo.cs \ + ports/MSVC++/2010/mpg123.sln \ + ports/MSVC++/2010/dump_seekindex/dump_seekindex.vcxproj \ + ports/MSVC++/2010/dump_seekindex/dump_seekindex.vcxproj.filters \ + ports/MSVC++/2010/feedseek/feedseek.vcxproj \ + ports/MSVC++/2010/feedseek/feedseek.vcxproj.filters \ + ports/MSVC++/2010/libmpg123/libmpg123.vcxproj \ + ports/MSVC++/2010/scan/scan.vcxproj \ + ports/MSVC++/2010/scan/scan.vcxproj.filters \ + ports/MSVC++/CMP3Stream/libMPG123/libMPG123.vcproj \ + ports/MSVC++/CMP3Stream/libMPG123/PLACE_LIBMPG123_SOURCES_HERE \ + ports/MSVC++/CMP3Stream/README \ + ports/MSVC++/CMP3Stream/SOURCE/CORE_Log.CPP \ + ports/MSVC++/CMP3Stream/SOURCE/CORE_FileIn.CPP \ + ports/MSVC++/CMP3Stream/SOURCE/SourceFilter_MP3Stream.CPP \ + ports/MSVC++/CMP3Stream/SOURCE/CORE_Mutex.CPP \ + ports/MSVC++/CMP3Stream/INCLUDE/CORE/CORE_FileIn.H \ + ports/MSVC++/CMP3Stream/INCLUDE/CORE/SourceFilter_MP3.H \ + ports/MSVC++/CMP3Stream/INCLUDE/IIEP_FileIn.H \ + ports/MSVC++/CMP3Stream/INCLUDE/IIEP_Def.H \ + ports/README \ + ports/Sony_PSP/config.h \ + ports/Sony_PSP/README \ + ports/Sony_PSP/Makefile.psp \ + ports/Sony_PSP/readers.c.patch \ + ports/mpg123_.pas \ + ports/Xcode/config.h \ + ports/Xcode/mpg123.h \ + ports/Xcode/mpg123.xcodeproj/project.pbxproj \ + scripts/benchmark-cpu.pl \ + scripts/tag_lyrics.py + diff --git a/deps/mpg123/Makefile.in b/deps/mpg123/Makefile.in new file mode 100644 index 0000000..83b9797 --- /dev/null +++ b/deps/mpg123/Makefile.in @@ -0,0 +1,1043 @@ +# Makefile.in generated by automake 1.12.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = . +DIST_COMMON = README $(am__configure_deps) $(dist_man_MANS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/libmpg123.pc.in $(srcdir)/mpg123.spec.in \ + $(top_srcdir)/build/config.guess \ + $(top_srcdir)/build/config.sub $(top_srcdir)/build/install-sh \ + $(top_srcdir)/build/ltmain.sh $(top_srcdir)/build/missing \ + $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ + TODO build/config.guess build/config.sub build/install-sh \ + build/ltmain.sh build/missing +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/addrconfig.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/src/config.h +CONFIG_CLEAN_FILES = libmpg123.pc mpg123.spec +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +man1dir = $(mandir)/man1 +am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgconfigdir)" +NROFF = nroff +MANS = $(dist_man_MANS) +DATA = $(pkgconfig_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + cscope distdir dist dist-all distcheck +ETAGS = etags +CTAGS = ctags +CSCOPE = cscope +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +DIST_TARGETS = dist-gzip +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AIX_CFLAGS = @AIX_CFLAGS@ +AIX_LDFLAGS = @AIX_LDFLAGS@ +AIX_LIBS = @AIX_LIBS@ +ALIB_CFLAGS = @ALIB_CFLAGS@ +ALIB_LDFLAGS = @ALIB_LDFLAGS@ +ALIB_LIBS = @ALIB_LIBS@ +ALSA_CFLAGS = @ALSA_CFLAGS@ +ALSA_LDFLAGS = @ALSA_LDFLAGS@ +ALSA_LIBS = @ALSA_LIBS@ +AMTAR = @AMTAR@ +API_VERSION = @API_VERSION@ +AR = @AR@ +ARTS_CFLAGS = @ARTS_CFLAGS@ +ARTS_LDFLAGS = @ARTS_LDFLAGS@ +ARTS_LIBS = @ARTS_LIBS@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COREAUDIO_CFLAGS = @COREAUDIO_CFLAGS@ +COREAUDIO_LDFLAGS = @COREAUDIO_LDFLAGS@ +COREAUDIO_LIBS = @COREAUDIO_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DECODER_LOBJ = @DECODER_LOBJ@ +DECODER_OBJ = @DECODER_OBJ@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMMY_CFLAGS = @DUMMY_CFLAGS@ +DUMMY_LDFLAGS = @DUMMY_LDFLAGS@ +DUMMY_LIBS = @DUMMY_LIBS@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ESD_CFLAGS = @ESD_CFLAGS@ +ESD_LDFLAGS = @ESD_LDFLAGS@ +ESD_LIBS = @ESD_LIBS@ +EXEC_LT_LDFLAGS = @EXEC_LT_LDFLAGS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +HP_CFLAGS = @HP_CFLAGS@ +HP_LDFLAGS = @HP_LDFLAGS@ +HP_LIBS = @HP_LIBS@ +INCLUDE_STDIO_H = @INCLUDE_STDIO_H@ +INCLUDE_STDLIB_H = @INCLUDE_STDLIB_H@ +INCLUDE_SYS_TYPE_H = @INCLUDE_SYS_TYPE_H@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +JACK_CFLAGS = @JACK_CFLAGS@ +JACK_LDFLAGS = @JACK_LDFLAGS@ +JACK_LIBS = @JACK_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LFS_LOBJ = @LFS_LOBJ@ +LIBMPG123_VERSION = @LIBMPG123_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_LDFLAGS = @LT_LDFLAGS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MINT_CFLAGS = @MINT_CFLAGS@ +MINT_LDFLAGS = @MINT_LDFLAGS@ +MINT_LIBS = @MINT_LIBS@ +MKDIR_P = @MKDIR_P@ +MODULE_OBJ = @MODULE_OBJ@ +NAS_CFLAGS = @NAS_CFLAGS@ +NAS_LDFLAGS = @NAS_LDFLAGS@ +NAS_LIBS = @NAS_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENAL_CFLAGS = @OPENAL_CFLAGS@ +OPENAL_LDFLAGS = @OPENAL_LDFLAGS@ +OPENAL_LIBS = @OPENAL_LIBS@ +OS2_CFLAGS = @OS2_CFLAGS@ +OS2_LDFLAGS = @OS2_LDFLAGS@ +OS2_LIBS = @OS2_LIBS@ +OSS_CFLAGS = @OSS_CFLAGS@ +OSS_LDFLAGS = @OSS_LDFLAGS@ +OSS_LIBS = @OSS_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +OUTPUT_CFLAGS = @OUTPUT_CFLAGS@ +OUTPUT_LDFLAGS = @OUTPUT_LDFLAGS@ +OUTPUT_LIBS = @OUTPUT_LIBS@ +OUTPUT_MOD = @OUTPUT_MOD@ +OUTPUT_OBJ = @OUTPUT_OBJ@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PORTAUDIO_CFLAGS = @PORTAUDIO_CFLAGS@ +PORTAUDIO_LDFLAGS = @PORTAUDIO_LDFLAGS@ +PORTAUDIO_LIBS = @PORTAUDIO_LIBS@ +PULSE_CFLAGS = @PULSE_CFLAGS@ +PULSE_LDFLAGS = @PULSE_LDFLAGS@ +PULSE_LIBS = @PULSE_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LDFLAGS = @SDL_LDFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SGI_CFLAGS = @SGI_CFLAGS@ +SGI_LDFLAGS = @SGI_LDFLAGS@ +SGI_LIBS = @SGI_LIBS@ +SHELL = @SHELL@ +SNDIO_CFLAGS = @SNDIO_CFLAGS@ +SNDIO_LDFLAGS = @SNDIO_LDFLAGS@ +SNDIO_LIBS = @SNDIO_LIBS@ +STRIP = @STRIP@ +SUN_CFLAGS = @SUN_CFLAGS@ +SUN_LDFLAGS = @SUN_LDFLAGS@ +SUN_LIBS = @SUN_LIBS@ +VERSION = @VERSION@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_LDFLAGS = @WIN32_LDFLAGS@ +WIN32_LIBS = @WIN32_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +dist_man_MANS = man1/mpg123.1 +SUBDIRS = src doc +DIST_SUBDIRS = src doc +ACLOCAL_AMFLAGS = -I m4 + +# pkg-config file for the mpg123 library +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libmpg123.pc + +# mpg123.spec is autogenerated but needs to be present in tarball! +EXTRA_DIST = \ + mpg123.spec \ + makedll.sh \ + windows-builds.sh \ + equalize.dat \ + NEWS.libmpg123 \ + ports/MSVC++/mpg123.h \ + ports/MSVC++/config.h \ + ports/MSVC++/msvc.c \ + ports/MSVC++/examples/scan.c \ + ports/MSVC++/examples/feedseek.c \ + ports/MSVC++/2005/libmpg123/libmpg123.vcproj \ + ports/MSVC++/2008/mpg123.sln \ + ports/MSVC++/2008/feedseek/feedseek.vcproj \ + ports/MSVC++/2008/mpglib/mpglib.vcproj \ + ports/MSVC++/2008/libmpg123/libmpg123.vcproj \ + ports/MSVC++/2008/scan/scan.vcproj \ + ports/MSVC++/2008/dump_seekindex/dump_seekindex.vcproj \ + ports/MSVC++/2008clr/2008clr.sln \ + ports/MSVC++/2008clr/mpg123clr/advanced.cpp \ + ports/MSVC++/2008clr/mpg123clr/advanced.h \ + ports/MSVC++/2008clr/mpg123clr/AssemblyInfo.cpp \ + ports/MSVC++/2008clr/mpg123clr/dllmain.cpp \ + ports/MSVC++/2008clr/mpg123clr/enum.h \ + ports/MSVC++/2008clr/mpg123clr/error.cpp \ + ports/MSVC++/2008clr/mpg123clr/error.h \ + ports/MSVC++/2008clr/mpg123clr/id3v1.cpp \ + ports/MSVC++/2008clr/mpg123clr/id3v1.h \ + ports/MSVC++/2008clr/mpg123clr/id3v2.cpp \ + ports/MSVC++/2008clr/mpg123clr/id3v2.h \ + ports/MSVC++/2008clr/mpg123clr/mpg123clr.cpp \ + ports/MSVC++/2008clr/mpg123clr/mpg123clr.h \ + ports/MSVC++/2008clr/mpg123clr/mpg123clr.rc \ + ports/MSVC++/2008clr/mpg123clr/mpg123clr.vcproj \ + ports/MSVC++/2008clr/mpg123clr/ReadMe.txt \ + ports/MSVC++/2008clr/mpg123clr/resource.h \ + ports/MSVC++/2008clr/mpg123clr/stdafx.cpp \ + ports/MSVC++/2008clr/mpg123clr/stdafx.h \ + ports/MSVC++/2008clr/mpg123clr/string.cpp \ + ports/MSVC++/2008clr/mpg123clr/string.h \ + ports/MSVC++/2008clr/mpg123clr/targetver.h \ + ports/MSVC++/2008clr/mpg123clr/text.cpp \ + ports/MSVC++/2008clr/mpg123clr/text.h \ + ports/MSVC++/2008clr/examples/feedseekclr/feedseekclr.csproj \ + ports/MSVC++/2008clr/examples/feedseekclr/Program.cs \ + ports/MSVC++/2008clr/examples/feedseekclr/Properties/AssemblyInfo.cs \ + ports/MSVC++/2008clr/examples/ReplaceReaderclr/ReplaceReaderclr.csproj \ + ports/MSVC++/2008clr/examples/ReplaceReaderclr/Program.cs \ + ports/MSVC++/2008clr/examples/ReplaceReaderclr/Properties/AssemblyInfo.cs \ + ports/MSVC++/2008clr/examples/scanclr/scanclr.csproj \ + ports/MSVC++/2008clr/examples/scanclr/Program.cs \ + ports/MSVC++/2008clr/examples/scanclr/Properties/AssemblyInfo.cs \ + ports/MSVC++/2010/mpg123.sln \ + ports/MSVC++/2010/dump_seekindex/dump_seekindex.vcxproj \ + ports/MSVC++/2010/dump_seekindex/dump_seekindex.vcxproj.filters \ + ports/MSVC++/2010/feedseek/feedseek.vcxproj \ + ports/MSVC++/2010/feedseek/feedseek.vcxproj.filters \ + ports/MSVC++/2010/libmpg123/libmpg123.vcxproj \ + ports/MSVC++/2010/scan/scan.vcxproj \ + ports/MSVC++/2010/scan/scan.vcxproj.filters \ + ports/MSVC++/CMP3Stream/libMPG123/libMPG123.vcproj \ + ports/MSVC++/CMP3Stream/libMPG123/PLACE_LIBMPG123_SOURCES_HERE \ + ports/MSVC++/CMP3Stream/README \ + ports/MSVC++/CMP3Stream/SOURCE/CORE_Log.CPP \ + ports/MSVC++/CMP3Stream/SOURCE/CORE_FileIn.CPP \ + ports/MSVC++/CMP3Stream/SOURCE/SourceFilter_MP3Stream.CPP \ + ports/MSVC++/CMP3Stream/SOURCE/CORE_Mutex.CPP \ + ports/MSVC++/CMP3Stream/INCLUDE/CORE/CORE_FileIn.H \ + ports/MSVC++/CMP3Stream/INCLUDE/CORE/SourceFilter_MP3.H \ + ports/MSVC++/CMP3Stream/INCLUDE/IIEP_FileIn.H \ + ports/MSVC++/CMP3Stream/INCLUDE/IIEP_Def.H \ + ports/README \ + ports/Sony_PSP/config.h \ + ports/Sony_PSP/README \ + ports/Sony_PSP/Makefile.psp \ + ports/Sony_PSP/readers.c.patch \ + ports/mpg123_.pas \ + ports/Xcode/config.h \ + ports/Xcode/mpg123.h \ + ports/Xcode/mpg123.xcodeproj/project.pbxproj \ + scripts/benchmark-cpu.pl \ + scripts/tag_lyrics.py + +all: all-recursive + +.SUFFIXES: +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): +libmpg123.pc: $(top_builddir)/config.status $(srcdir)/libmpg123.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +mpg123.spec: $(top_builddir)/config.status $(srcdir)/mpg123.spec.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool config.lt +install-man1: $(dist_man_MANS) + @$(NORMAL_INSTALL) + @list1=''; \ + list2='$(dist_man_MANS)'; \ + test -n "$(man1dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.1[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ + done; } + +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man1dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.1[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) +install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ + done + +uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done +cscopelist-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) + +clean-cscope: + -rm -f cscope.files + +cscope.files: clean-cscope cscopelist-recursive cscopelist + +cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files + +distdir: $(DISTFILES) + @list='$(MANS)'; if test -n "$$list"; then \ + list=`for p in $$list; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ + if test -n "$$list" && \ + grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ + echo "error: found man pages containing the 'missing help2man' replacement text:" >&2; \ + grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ + echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ + echo " typically 'make maintainer-clean' will remove them" >&2; \ + exit 1; \ + else :; fi; \ + else :; fi + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__post_remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__post_remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__post_remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__post_remove_distdir) + +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod u+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__post_remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile $(MANS) $(DATA) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgconfigdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-man install-pkgconfigDATA + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: install-man1 + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-man uninstall-pkgconfigDATA + +uninstall-man: uninstall-man1 + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \ + cscopelist-recursive ctags-recursive install-am install-strip \ + tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-cscope \ + clean-generic clean-libtool cscope cscopelist \ + cscopelist-recursive ctags ctags-recursive dist dist-all \ + dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ dist-xz \ + dist-zip distcheck distclean distclean-generic \ + distclean-libtool distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-pdf install-pdf-am install-pkgconfigDATA \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-man uninstall-man1 \ + uninstall-pkgconfigDATA + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/deps/mpg123/NEWS b/deps/mpg123/NEWS new file mode 100644 index 0000000..556885b --- /dev/null +++ b/deps/mpg123/NEWS @@ -0,0 +1,1200 @@ +1.14.4 +--- + +Who reworks a parsing and data mangling without really making sure that things still work like before? I hope I won't do so in future. Not again. + +- Fix resync logic to properly work again (used to prematurely end stream on bad headers). A regression again, this sucks, but at least we got a regression test for that now. +- Fix aeon-old regression (since 1.11.0) about short seeks: Bit reservoir was reset also for short seeks that did not break continuity. +- Another damned regression got fixed: Sample-accurate seek for files without full gapless info. + +1.14.3 +--- +- Fix regression from 1.14.1 in parsing of bad free format streams, avoiding apparently endless loops (just very slow reading, in fact). + +1.14.2 +--- +- Fix writing of WAV to stdout. + It is still not the best of ideas to do so, though. At least make sure to fix rate and channels. + +1.14.1 +--- +- Fix subtle bug that could trigger failure to detect a format change on resync when using libmpg123's feeder API. + That bug has been there since ages but was neutralized by other (buggy) behaviour of the parser before the little overhaul. The Law of an Even Number of Bugs. + +1.14.0 +--- +- libmpg123 API version 36 (see NEWS.libmpg123) +- Add --ignore-streamlength. +- But also deal with concatenated (Frankenstein) streams: Not applying gapless cutting once we're over the announced number of frames. +- Also, gapless cutting is only applied if relevant information is present. Previously, at least the decoder delay has been cut. +- Add --lyrics for printout of lyrics (from USLT in ID3v2). +- Added handling of SIGUSR1 and SIGUSER2 to terminal control code, configurable via --ctrlusr1 and --ctrlusr2. +- Some low-level API added (mpg123_framedata(), mpg123_framepos(), buffering and resampling control). +- Added info about input buffer fill to mpg123_getstate(). +- ReplayGain: Try to detect LAME below 3.95 for the different reference level of 83 dB (adding preamp of 6 dB). Version 3.95 itself (not 3.95.1) I cannot detect. User-set gain values are not touched. +- Keep silent about missing bit reservoir when ignoring frames. That is the whole point (mostly;-). +- Add the new/old WRITE_SAMPLE variant from MPlayer that makes the generic decoder faster on older CPUs (x86 at least). Not on x86-64, though (it's not enabled per default there). +- Handle out-of-disk in the file writers (a bit, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=67259) +- Added Xcode project files to build libmpg123 on Mac OS and iOS +- 32 bit output for sndio output (patch by Brad Smith). +- Remote control interface knows LOADLIST command now. +- Now freeing meta data memory after printout. +- Some documentation cleanup, including manpage fixes by quadrispro. +- Re-enabled wildcard expansion on Windows (been broken by unicode file name support). +- Fix MMX tabinit syntax (thanks to Marcel MĂĽller for pointing that out). +- Fix SGI audio output (been broken since change to modules). +- Fix some fringe behaviour (mpg123_getformat() triggering needless reading of next frame, possibly hitting bogus MPG123_NEED_MORE). +- Resync limit now also serves to increase amount of skipped junk on beginning. +- Better separation of stream end and read error (in case there is no stream opened, even). +- Don't always complain about failed free format header search (only with verbosity level 3). + +1.13.8 +--- +- Fix build for ARM Thumb (incompatible assembly in some macros). + +1.13.7 +--- +- Fix endless loop in module loader when starting mpg123 in a directory that does not exist. + +1.13.6 +--- +- Fix output of one random character in -vvv mode for ID3v2.2 frames (no buffer overflow, move along, folks;-). + +1.13.5 +--- +- Fix reading of ReplayGain values from Lame tag (nobody seen this before?!) + (both actual values and the distinction between audiophile / radio). +- Accept application/octet-stream as input from HTTP. +- Update man page with encodings. +- Build fixes. + +1.13.4 +--- +- Fix bogus error on resync with big offsets (hits systems that have bigger off_t than int), bug 3393801. +- Fix windows binary package build script again with plugdir. + +1.13.3 +--- +- Fix an endless loop on bad headers, bug 3267863. +- Prevent compiler warnings about unused variables with gcc 4.6 . +- Fix return value handling of getaddrinfo(), bug 3288333. +- Make decwin size computation work for OPT_ARM and sizeof(long) != 4 (bug 3288360). + +1.13.2 +--- +- Updated .NET wrapper (MPG123_SKIP_ID3V2, encsize and mpg123_strlen functions) by Malcolm Boczek. +- Fix crash when calling mpg123_decoder() before opening a track -- a rare use case since one can choose a decoder with mpg123_new() already. +- Fix format change detection for certain (artificial) concatenated streams (p.ex. MPEG 1 frames following MPEG 2 frames). +- Prevent the nasty of bug 3154889: No change of pitch without a current audio format. No proper solution, but more like earlier behaviour. +- Fix some compiler warnings. +- Fix a memory leak in the module loader, also some in the examples, for being pedantic. +- More use of AC_LANG_SOURCE to silence autoconf. + +1.13.1 +--- +- Fix --float and --8bit (MPG123_FORCE_FLOAT, MPG123_FORCE_8BIT) regression, caused by introduction of 24 bit formats. (bug 3151597). + Btw: The use of specific format choice via `mpg123 -e f32` and friends is encouraged (meaning mpg123_format_none() / mpg123_format() calls in libmpg123 API). +- Loosen the parser restrictions: Allow the private header bit to vary. It is not mpg123's business anyway (finally suggested by Marcel). + +1.13.0 +--- +- libmpg123 API version 29 (see NEWS.libmpg123) +- New optimization: ARM NEON (Cortex A series) -- kudos to Taihei, again! +- Added 24 bit integer output (truncation of 32 bit integer). +- Cleanup of symbols for the static library: Only have global symbols that are actually needed, prefix them with INT123_ to avoid conflicts. +- Added --streamdump to get a copy of the data libmpg123 used. +- Added --icy-interval and tweaked libmpg123 to make playback of ICY stream dumps possible. +- Added possibility to set module file suffix at build -- to be able to avoid .la files for plugins. +- Removed compiler directives for alignment and disable associated tests. + The tests don't work on a wide range of compilers anyway, and newer gccs + do have force_align_arg_pointer to fix bad stacks. +- There is no ChangeLog file anymore... it was autogenerated from subversion log anyway, so look there if interested. + +1.12.5 +--- +- Fix bug with the new meta data printout of the mpg123 app; embedded null bytes in UTF-8 strings in non-UTF-8 environment would trigger buffer overflow. + Thanks to Jakub Bogusz of PLD Linux for the tip. And yes, shame on Thomas for changing working string handling code. At all. + +1.12.4 +--- +- Fix formatting of meta data printout in UTF-8 (string length computing). + As a collorary, ID3v1 data is reduced to ASCII in UTF-8 environment, as we do never know what specific encoding that has. + +1.12.3 +--- +- Fix a long-standing bug that subtly broke http streaming with ICY meta data when reading a bit more quickly, like when using the buffer. + I was a very simple and embarrassing bug, actually ... and it made me wonder how normal streaming still worked rather well, generally:-/ + Thanks to Lint for staying with us and reporting bug 3022850, to finally get a grip on streaming reliability. + +1.12.2 +--- +- Fix for nasty memory corruption on configurations that hand out addresses in the upper half of the memory space (the poiner alignment function broke in that case, bug 2996045). +- Various build and portability fixes (including making some exotic configure switches work (again)). +- Add dump_seekindex example +- Sync mpg123_clr to 1.12 feature set, patch provided by Malcolm Boczek + And actually include it in release tarball! +- Rework mpg123.h logic for large file stuff a bit, clients can control it by defining MPG123_NO_LARGENAME or MPG123_LARGESUFFIX. +- Include dumb wrappers to provide names suffixed with _64 on 64 bit machines and _32 on 32 bit machines, respectively, to help clients that insist on defining _FILE_OFFSET_BITS where it is not needed (or with a non-large value). +- Tuning of the internal buffer code for feeder mode to minimize its performance impact (works in 4K blocks now). +- Workaround for compiler bugs in Open64/PathScale/SunStudio (bug 3004396, suggestion by Doug Gilmore). + Note that Sun Studio is still a tricky fellow, at least when it comes to our preprocessed assembly. + Also, x86-Open64 recently produced another segfault in layer3.c on my box... GNU and intel compilers are what one can use as something stable. +- Make mpg123_getformat() return more error codes (like MPG123_NEED_MORE). +- Fix handle I/O for clients with small file offset (32 bit when libmpg123 has 64 bit). +- Fix 3DNow(Ext) standalone builds. + +1.12.1 +--- + +- Update INSTALL for the dual-mode library. No code changes. + +1.12.0 +--- + +Attention: This reverts the big bad libray name change. People did not like libmpg123_64.so at all ... so Thomas went along with proving that being responsible for a open source library package sucks for your life -- he coded large file dual-mode into libmpg123. One library with both APIs, like glibc. + +- libmpg123 25.0.25: + - The separate libraries are gone again, this one is dual-mode (using ca. 750 lines of not very funny code). + - The library even translates callbacks between large file support modes. + - Introduce handle-based custom I/O in libmpg123. + - The header now defines MPG123_API_VERSION to help compile-time detection of available functions (lib is version 25.0.25 now... MPG123_API_VERSION is 25). +- Make the usage of AI_ADDRCONFIG dependend on a configure check. This flag is not available everywhere. + + +1.11.0 +--- + +Attention: There was a re-release of the source archive, because the initial one missed the actual changes for the library name. +Sorry for the inconvenience:-/ + +- Big bad libray name change for builds with enabled large file support. + That will break libmpg123 binary compatibility on Linux/x86 when upgrading from mpg123>=1.5.0 with enabled large file support. You need to relink with the new library called libmpg123_64. + If you do not enable large file support, or it is implicit on your platform (x86-64), the library keeps the old name of libmpg123 and everything is fine. +- Assembler cleanup: + - no use of compiler-based stack alignment (for SSE), helping portability + - mostly performance neutral, hint at faster decoding for the dynamic build and slower for static, but small change in any case +- Windows networking (access http streams in mingw builds). +- Do not ask for addresses that do not have matching interfaces configured (IPv6 on a IPv4-only host, for example). + That can help with broken DNS servers that choke on IPv6 addresses (T-Online Speedport W502V, for example). +- Fix a potential ICY reading problem were ICY metadata could be read as mp3 data (basically for MPEG frames bigger than the ICY interval). + + +1.10.1 +--- + +- Help multilib setups that boldly assume that headers are invariant by removing the consistency check in mpg123.h and instead just adding a suffix to relevant functions when _FILE_OFFSET_BITS is defined. Invalid setups will now fail at the linking stage instead of the preprocessing stage. + That should cover bug 2934488. +- Fixes for gapless decoding: + - Correctly skip padding larger than one MPEG frame (strange, but occurs). + - Bug 2950218 (proper gapless cuts for seeking near the end). +- Make sure the search for the first header aborts after 64K of one-byte reads, as always intended (bug 2951334). + Certain files (or even random data) were able to fool mpg123 sufficiently enough that it basically reads through the whole file in 1-byte steps in search for MPEG data. + The limit of 64K will very likely be configurable in a future mpg123 version. +- Fix subtle bug with seeking in feeder mode: A seek close to the current position (meaning: the needed data offset is already in mpg123's buffer chain) resulted in skipped bytes. +- Improve the feeder mode for handling large amounts of junk at the beginning, including proper passing of the request for more data when trying to determine free format frame size. This also fixes endless looping as reported in bug 2951334. +- The parser code still needs overhaul. It is not pretty. +- Compile fix for OpenAL. + +1.10.0 +--- + +- Confirmed/fixed on OS/2 platform. + At least a static build works with native audio output and generic decoder. +- Make modules work with libtool-2.2.6b . +- Added pitch command to control interface. +- HTTP header field and MIME type parsing now case-insensitive (fixes bug 2904736). + Also, the MIME-parsing for non-playlist URLs is done the same way as from playlists now. + And, we interpret MIME types only to before a ";" (see bug 2836904). +- There is a build-time option to enable unicode file names on windows now. UNIX (Linux) does not need that, UTF-8 works natively. + An unicode-enabled build of libmpg123 expects file names as UTF-8 strings, opening of non-utf8 strings (by old applications) still works via fallback when the conversion of the string or opening of the file failed. +- Also, on Windows, --realtime now works, along with added granularity of the new --priority parameter. Note that you get the latter functionality through nice/renice on UNIX, no need to add that to mpg123. +- Added experimental framebyframe API. +- Added a new Microsoft common language runtime wrapper (aka .NET wrapper) written by Malcolm Boczek. See ports\MSVC++\2008clr\mpg123clr\ReadMe.txt for further information +- Added Visual Studio 2010 Beta 2 project files for libmpg123 +- Updated autotools machinery, autogen.sh is gone, use `autoreconf -iv`. + +1.9.2 +--- +- Fix logic failure in gapless code: The trailing silence was only cut on the first decode. So, seek-back and decode again never was gapless:-( +- Fix linker flags on MacOS 10.6 . +- Improve portability (mainly for Solaris/x86, possibly others). +- Fix reading from standard input in Windows (use binary mode). + +1.9.1 +--- +- Fix OpenAL output issue (bug 2840085) +- Fix theoretically possible discarding of some audio samples when getting a new format. +- Fix unwanted verboseness (some error messages from library even when MPG123_QUIET was specified). +- Fix back-to-beginning for feed_skip (fixes bug 2859531). +- Fix the CPU creep bug with NtoM decoding. + That one has been nasty on you with large files since bad frame fillup has been introduced. +- Fix regression (since 1.9.0) in ID3 parsing: Now Foobar2000 RVA fields are interpreted again (among others). +- Fix some compiler warnings, minor cleanup. + +1.9.0 +--- + +- Free format support. +- ARM assembly optimizations (yay Taihei again!). +- Dither noise now runtime-generated, thus less bloated binary (thanks Taihei...). + This means that dithered decoding is now included per default. + Please note that work is ongoing to improve the dithering quality, more to come. + For example: Accurate rounding to 16bits is now always used for generic dithered decoder, there are plans to adapt the noise for different sampling frequencies. +- Buffer plays any audio type now. +- New output module: OpenAL +- Bug fixes: + - Broken frame fillup for non-signed 8 bit formats with correct zero (bug 2805665) + - Crash on invalid UTF-16 in ID3 tags fixed (thanks to Andy Hefner) + - Bad detection of separated UTF-16 strings in ID3 tags (bug 2834636). +- Topic ID3 and UTF: Now we are more tolerant with UTF16, even accepting those broken tags that id3v2 produces (multiple conflicing BOMs). +- Build system allows AltiVec on non-Macs now (don't enforce unsupported gcc flags). +- Terminal control mode is more verbose (gives hint about pressing 'h'). +- The library now offers a switch and small API to defer translation of ID3 text data until client app wants to do it (or not). + +1.8.1 +--- +- Include improvements to integer decoder from SVN trunk. + They have been accidentally promised on 1.8.0 release announcements, though they were not there. Here it is: ISO compliant fixed point decoding (speed optimizations are still reserved for next release). +- Fixed build with ./configure --enable-modules (bug in configure script). +- Fix name of binary in help screen when called with path. +- Build fix for old gcc with AltiVec code. +- Update of Sony PSP build files. + +1.8.0 (The Taihei Monmament) +--- + +- New and improved SSE optimizations! For x86-64, too! Also AltiVec! Fast float output! Faster stereo! + Finally, this should put mpg123 into the efficiency-leading position on current hardware! + Thanks go out to Taihei Monma for pushing lots of new assembler code. +- Added proper rounding modes to 16bit integer. + - Use ./configure --enable-int-quality to prefer accuracy over speed. + - Accurate code (generic, SSE, 3dnow -- i586 has always been good) delivers ISO compliant quality with 16bit output. + - Uses fast rounding for IEEE754 floats. + - Mpg123 can do fully ISO compliant MPEG audio decoding to 16bits (of course to 32bit float/int, too). +- subtle performance enhancements via broader data alignment +- Prefer SSE code over 3DNowExt. + - It can be tight, but generally our new SSE code is better on CPUs that can do both. +- Remove HF cutoff (SFB21), has been introduced in 0.59r . +- Fix layer 1 regression (been there since version 1.x). + - Layer 1 ISO compliance test is positive now. +- Fix layer 2 regression (false positives header change). + - Layer 2 ISO compliance test is positive now. +- more sample-accurateness + - Clear frame buffers before seek. + - Decode 4 frames in advance for layer 3 (2 for layer 1 and 2) per default. + - Number of layer 3 frames to decoded in advance (and fill bit reservoir) is runtime tunable (--preframes). +- Do not stop decoding after stray ID3v1 tags in streams (bug 2793677). +- Fix handling of negative RVA2 values in ID3v2 (bug 2792417). +- Discard bitreservoir of previous frames if a resync is needed. +- improve perceived randomness of --random (do not repeat too early) +- Fix special crash case in UTF16 conversion for ID3v2. +- MPG123_MODDIR environment variable for changing module directory at runtime +- arts output fixes (bug 2715128) +- win32 output swallowing less buffers at end (but still some audio is lost, bug 2722991) +- tested mpg123 on OS/2; it works, but not the native audio output (SDL works) +- WAV output announces supported output formats correctly +- fix buffer startup to make sure the first bits of audio are not discarded (bug 2796802) +- re-enable the --gain parameter (the move to modules disabled that), untested +- Libltdl is _not_ included anymore. + - The host system is expected to provide it, otherwise plugins are not used. + - Our copy does not get in the way anymore. +- enhancements of the MSVC++ builds, including optimizations using yasm +- general build system fixes +- Legacy build system is gone. +- code cleanup + - signed/unsigned integer usage, make compilers more happy) + - simplified synth selection code (it is _less_ code now, and does more) +- Fixed behaviour of MPG123_NEW_FORMAT: Now it does not stop you from just continuing decoding without querying the (new) output format, this behaviour regression had been there since somewhen after 1.4.3 . + +1.7.3 +--- + - Fix a regression introduced with the --doublespeed fix. Now seeking should be a lot smoother again. + +1.7.2 +--- + - Fix a possible vulnerability in the ID3 code (negative encoding values). + +1.7.1 +--- + - Just one fix for making the RVA switch in terminal and generic control mode work again (instead of plain silence). + +1.7.0 +--- +- Lots of output format fun! + - now supporting 8, 16, 32 bit signed/unsigned integers, + 32bit float (64bit float can be hacked in quickly) + - optimized decoders use fallback routines for non-optimized + formats transparently + - flexible resampling is automatically chosen when output does + not support standard rates (like a JACK server) + - That meant quite some restructuring in the decoder code... +- Lots of core functionality now optional, enabling small-footprint + builds of libmpg123. + - choosing among the MPEG layer codes + - NtoM resampling + - downsampling + - feeder API (mpg123_open_feed()) + - ID3v2 + - String API + - ICY + - output formats + - error/warning message printouts + - ... a layer3-only shared libmpg123 can be just 107K on x86-64 + or 94K on x86 +- --preload (tune prefill before playback for buffered mode) +- win64 support (one report at least;-), modules working on Windows +- Windows/MSVC++: fixed handling of unicode file names, + mpg123_topen() now actually working there + - You are obliged to use mpg123_tclose() now! +- using "plugins" subdir relative to mpg123 binary + (in addition to ../lib/mpg123) +- switch to libtool 2.2 and automake 1.10 for the build scripts + - though no update to new libtool 2 API, yet +- some portability fixes +- prevent user from creating non-working I/O setups + (replacing timeout reader, ICY with feeding) +- JACK output accepts port names for -a, stereo gets mixed down + when only one port is chosen +- added sndio output, contributed by Christian Weisgerber +- Make --doublespeed paramter work, porting of which has been + forgotten in the 1.x series! + Along with that, a regression in decoding has been fixed + (concerning skipping of frames in general). + +1.6.4 +--- +- Fix for consistent NtoM resampled decoding and broken frames fillup. + +1.6.3 +--- + +- Fix sf.net bug #2413608: Make sure a new format does not slip through after early close. +- Include equalizer example file and a piece of wrapper code for MSVC++ in the distribution. +- Do not claim to support unsigned 16 bit encoding (never been the case). +- Fix default fifo detection, now it actally activates fifo support! + +1.6.2 +--- + +- Fix default IPv6 detection in configure.ac (a typo has been introduced before). + +1.6.1 +--- + +- Fix printing of largefile offsets in remote control interface. +- Some portability fixes (reduced compiler warnings on Solaris, p.ex.). + +1.6.0 +--- +- small things inside that I forgot to mention +- some new commands for remote control interface: + - SCAN + - SAMPLE + - EQFILE + - SHOWEQ +- added --keep-open command line flag (for remote control) +- fixed equalizer file parsing to really handle comment lines as example file suggests +- more elaborate detection of UTF-8 locale, also --utf8 switch to force it +- added --fuzzy to enable inexact seeking (see below) +- added --index-size parameter for tuning accurate frame seek index +- enabling largefile support via configure +- libmpg123 11.0.11: + - added mpg123_geteq(), mpg123_tell_stream() and mpg123_getstate() + - API cleanup (take const char* for mpg123_open()) + - calm down complainling (C++) compilers by completing the mpg123_channels enum + - fixed several possible crashes when user provides NULLs where it isn't appropriate + - workaround for frames that fail decoding (bad frame body, missing bit reservoir): fill up with silence + That also fixes seeking issues related to bad frames since now the fixed relation between frame and sample offsets is restored. + - Finally realized what that the resampling code for integer math (generic_nofpu) was just incomplete! + Now it works, using the defined integer multiplication. + - Detect UTF-8 in ICY conversion (instead of just assuming CP-1252, provided by Torsten Glaser). + - Prevent ugly noise when the bit reservoir is not fully there (p.ex. ignorantly cut mp3 files). + Concerned frames are silenced, but reservoir for following frames is kept. + Thanks to Patrick Dehne for the investigation and patch! + - New option for fuzzy seeking; trading sample accuracy for speed. + With that option, seeks positions are guessed using mean framesize or the Xing VBR TOC is used. + - Feeder streams work with seek index now. + - Seek frame index is runtime tunable. + - more caution with alignment issues for varying library users +- new project files to build/use libmpg123 with MSVC++ 2005 and 2008, provided by Patrick Dehne +- fixed a regression that made the pause/loop mode in terminal control slowly go backwards + +Big note for libmpg123 users: Make sure your application is compiled with the same largefile setting as libmpg123! +If that does not match, you will get unresolved symbols (which is better than weird errors when using a nonmatching off_t in arguments;-). + +1.5.1 +--- + +- fix wav/au/cdr writing to stdout (bug #2044423) +- add more sensible --no-resync to replace --resync (bug #2044404) +- libmpg123 7.0.7 + - fix thread safety of SSE decoder (bug #2053181) + - fix robustness of length handling, added mpg123_set_filesize() (bug #2064322) + +1.5.0 +--- + +- libmpg123 6.0.6 + - Floating point decoding back again, (build time choice for now; --with-cpu=generic_float). + - More robust string handling; extended string API. + - fixed an (so far) unnoticed ID3 bug that may have obscured comment fields + - added mpg123_feed() as shortcut; using const input buffer now + - resync is enabled again for ICY streams (the trouble in the past was due to a reader bug, not the streams) + - decode ICY text data to UTF-8 (thanks, Thorsten) + - preserve file flags for timeout mode +- More elaborate (helpful?) error message for output format problems. +- Reworked HTTP code... and added IPv6 support! +- Fix the --proxy parameter (has been accidentally ignored before). +- Added --ignore-mime to work with web streams with funny playlist MIME types like "audio/megurl". +- Know MIME audio/mpegurl. +- --timeout is now also used for the connection itself (not just reading). +- Now trying to resume ALSA device after suspend. +- subtle build changes (your CFLAGS rule now) + +1.4.3 +--- + +- Fix mpg123_tell() and mpg123_seek() return values with respect to the samples in decoding buffer (bug 1947373). +- Fix (bogus) 3DNow detection on IDT C6 (bug 1947982). +- Fix mono playback of win32 output (bug 1955157). +- Fix ABI compatibility with compilers that don't align the stack like gcc does (fixing SSE crashes on win32). + +1.4.2 +--- + +- Fix build problems (for Cygwin and Win32, perhaps others, too). + +1.4.1 +--- + +- Fix a serious regression of terminal control mode (forgot to remove a term_restore(), bug 1936548). + +1.4.0 +--- + +- Enable runtime check for available and working output modules. + Now mpg123 tries all built modules (or a list specified in mpg123 -o moda,modb,modc) in turn to find a working output. + This minimizes the situation of having to specify a device when default output doesn't work for some reason. + See bug 1910500. +- libmpg123 2.2.2 + - Fixing an endless loop for ICY streams that suddenly end without error (just EOF). + - Further fixes around EOF handling in (buffered/ICY) streams. +- Enable user to interrupt mpg123 when stuck in a loop of failing to open a track (with --loop). +- This time with correct RPM spec (hopefully... sorry, Michael!). + +1.3.1 +--- +- Enable snd_pcm_sw_params_set_xfer_align() for alsa-lib < 1.0.16 (bug 1908603). +- libmpg123 2.1.2 (no-op change) + +1.3.0 +--- + +This is a _major_ fix release for http streaming! +Much more usable than earlier mpg123 1.x versions. + +- libmpg123 libtool-version 2.0.2 + - Fix nasty bug in ICY reader that failed to account for partial reads from slower network. + - Now non-seekable streams can get peek-ahead for MPEG sync, too, triggered by the MPG123_SEEKBUFFER flag. + - Do not try to resync on streams with ICY metadata, that won't work. + Consequently, if there's unreliable network, use --loop -1 to make mpg123 reconnect to the server on errors. + - Applying a few layer 3 decoder fixes from old mhipp CVS (hail to the creator;-) + That includes the fix for bug 1895025. + - Fix ID3v2 parser with very invalid claimed ID3v2 frame sizes (could have triggered DOS before). + - Oh, and fixed a steady memory leak in ID3 handling. Should mention that;-) +- Print ICY-NAME and ICY-URL again, as mpg123-0.6x did. +- Added --smooth option for not flusing buffer between tracks but at program end only. +- Included some contributed ports/bindings of libmpg123 under ports/ . + +1.2.1 +---- + +- libmpg123 libtool-version 1.2.1 (coincidence!) + - Earlier check for free format headers to prevent them from screwing up resync (free format still not supported) + - bug 1889051: more flexible resync, not insisting on the format of the first frame (which could have been bogus) +- Add an output write loop to handle SIGSTOP/CONT operation (bug 1890563). +- Fixed a bug where playback status for some http streams was not shown. + +1.2.0 +---- + +- libmpg123 libtool-version 1.0.1 + - See NEWS.libmpg123 for details. + - This adds --resync-limit parameter to mpg123. +- Some build system work, including: + - It is now possible to build a mpg123 rpm from the source tarball via rpmbuild -tb . + - configure: Accept --with-audio=foo,bar,bla (comma-separated list) in addition to --with-audio="foo bar bla". + - autogen.sh included in distribution. + - Include the forgotten i486 files in the distribution (now that's embarrasing...). + Also a little fix for wrong --list-cpu on i486 build. + - Fix build with MinGW32. +- Fix -v stat output (time display) for MinGW32 build. + +1.1.0 +---- + +- Added arts output. +- More verbosity on lame/xing/info tags (on demand) instead of compile-time debugging switch. +- XMMS2 plugin cleanup (submitted to XMMS2 for inclusion) +- Improved ID3v2 robustness (let bad tags not affect playback of the important part). +- Terminal control: + - Key for going to previous track ([d], because it's left of [f] usually... no config file yet for that). + - Key for printing current playlist, [l]. + - Now possible to switch on verbosity also for mpg123 -q -C + - Key for (re)printing ID3 tag info ([t]). + - Key for (re)printing MPEG frame header info ([m]). +- Soften the -q option: Now you are able to increase verbosity after -q again, like mpg123 -q -v (this fixes cplay's progress display). + +1.0.1 +---- + +- Fix module loader to prevent crash in working paths with more than 49 characters length (bug 1859413). + +1.0.0 +---- + +- Fixed Pulseaudio. +- Cleaned up configure. +- Pushed remote control version to v3. +- Updated documentation. +- Fix VPATH build for generated mpg123.h . + +1.0rc3 +---- + +- Fixed JACK output. +- Disable buffer when statically building CoreAudio in (MacOSX); with CoreAudio module the buffer works, with static output it doesn't. + This is the situation because of fork() discrimination by Apple Inc. . +- Added verbosity to tell about ID3v2 text encodings (level 4). +- minor cleanup + +1.0rc2 +---- + +- Fixed some bugs, the ID3v2 interface of libmpg123 is safer now (there were possibly stale pointers in there). +- Buffer mode got vital improvements (yeah, that is sort of feature creep during release process, but worth it) + The improved communication makes it possible to skip tracks in terminal control mode without the hack to immediately restart playback. + To be able to do seeking in terminal mode with buffer properly, buffered playback stops on seek keys. You restart playback after you are done with seeking. +- Support either portaudio v18 or v19 API (v18 works for me, v19 works according to user report). +- Audio output handling got safer and more clean, a byproduct of implementing the above. I stumbled over some things and had to fix it (yeah, feature creep in parts again, but still: Worth it!;-) + Any audio access is now restricted to either that standalone mpg123 process or the buffer process, the output being opened _after_ the fork(). + There is hope that this fixes buffered output on MacOSX. +- More feature creep, this time because of something like that was already included in the Debian mpg123: + --delay parameter to issue a pause before each track (does not make sense for file writing outputs, though). +- Even more feature creep: remote control can now give ID3v2 data, also in more raw form via new "tag" command. + This sort of qualifies as bugfix, actually, since it's item 1786430 on the tracker;-) +- Make flexible rate computations more safe (especially on 32bit platforms) by switching to the looping code instead of direct multiplication/division (which blows up with integers). A possible effect was premature track ending with a forced rate. +- Flexible rate mode works _at_all_ again with fixed output support detection code (comparison of -1 with a size_t ended a loop all too early). +- check for error in flushing output (this ends mpg123 for a broken pipe, for example) + +1.0rc1 +---- + +- In one word: LOTS! +- Many small things that happened while migrating to the new setup. +- The decoder is now a library (libmpg123) which can be installed also for other programs to use. + This finally provides a heavily improved replacement for the aged mpglib. We have doxygen API doc, example codes. + You can still choose to compile the decoder statically into the mpg123 binary, though. +- We have a plugin system for audio output! This should be relieving to package maintainers for binary distributions, drastically reducing the number of builds they have to provide. + Here, too, you can choose to build one audio output into the binary like before; you can have your old-school one-piece mpg123 or the hip I-am-legion shared-lib-and-plugin flexible mpg123;-) + One exception: For now, you have to compile without modules in MinGW32/MSYS. +- ID3v2 support has been enhanced and, in the case of specific comments (those with a description), fixed. + The ID3 parsing is part of libmpg123, offering support for virtually all textual information in ID3v2.2, ID3v2.3 and ID3v2.4 tags (along with the usual 128 bytes of ID3v1 or ID3v1.1 in a block). + All tag texts are converted to UTF-8, allowing mpg123 to properly display special chars in an Unicode terminal without fuzz (for non-UTF locales, there is still the ASCII reduction). +- Gapless decoding (of layer 3 streams) is now considered to be a standard feature and is enabled per default both at build- and runtime. +- ... + + +0.68 +---- + +- Fix bug 1807964: distorted playback of MPEG 2.5 files + +0.67 +---- + +Thanks go out to the ROM 106.5FM team (http://www.rom.lu/) for supporting this release with a donation on sf.net and a bottle of finest Gewuerztraminer wine from Luxembourg! + +- verified that it builds on SGI IRIX 6.5 for MIPS32 and MIPS64 +- enable flexible rate for stdout decoding, too +- UTF8 filtering to ASCII finally works thanks to Mika Tiainen, see bug 1745847 +- corrected frame offset; -k was off by one + This means now that -k disagrees with mpg123 0.59r on many files because the old version does play a frame of silence when encountering LAME tag instead of dropping it for audio. +- added --timeout : Possibility to end playback on a stream that doesn't give data for seconds. +- added --loop : for ... well... looping playback of a track; motivation was persistent internet streaming with unreliable connection (together with --timeout) +- build fixes +- use movap instruction in SSE assembly when compiler supports the needed alignment (idea from MPlayer) +- show decoder options in their priority order in --list-cpu/--test-cpu +- added Perl script to benchmark each of mpg123's CPU optimizations +- portability enhancements and cleanups along with testing on SunOS 4.1.2 with gcc-2.7.0 +- workaround for ugly flexible rate for MMX/SSE/3DNowExt code: + --with-cpu=mmx also includes i586 code as fallback; similar with the others + +0.66 +---- + +- support for a combined build of x86 optimizations and runtime selection among these + The (supposedly) "highest" CPU-supported optimization is chosen by default, + --cpu, --list-cpu and --test-cpu parameters are there for you to take control. +- default build for x86 systems is combined "x86" with generic, i386, i586, MMX, 3DNow, SSE, 3DNowExt; + "x86_dither" also includes the dithering i586 decoder +- no automatic -march compiler flags anymore; + the --with-cpu configure option selects specific assembler code but special CFLAGS are up to you +- extended 3DNow and SSE optmizations from MPlayer's mp3lib +- x86 assembler optimizations adapted for MacOS X/Intel +- straight support for Windows using MinGW32, reactivated the native WinMM output + Core functionality including assembler optmimizations and WAV writing is there. +- assembler optimizations also for cygwin +- set remote-err automatically when putting audio to stdout +- a bit more general portability in the new build system +- fix file creation mode for -O +- experimental decoding to 32bit float (raw and WAV file): ./configure --with-cpu=generic_float +- generic control interface (-R) can create and read from a named pipe, parameter --fifo +- audio bugfix: playback of mono file on stereo-only hardware, better error reporting there +- ALSA output handling underruns +- MMX, SSE and 3DNowExt fallback to i586 and below or 3Dnow for forced sample rate +- more terminal control: volume, RVA and verbosity controls + +0.65 +---- + + - now allow crc bit to vary over stream (fixes files with bad lame tag and some internet streams) + - do not try to parse id3v2.2 (as opposed to 2.3 and 2.4) + - correct id3v2.3 parsing for not expecting syncsafe integers for framesize, 2.4 introduced that + - omit gcc specific compiler flags when gcc is not there + - initital attempt to support sgi/irix with configure (please test) + +0.64 +---- + + - fixing a potential denial of service problem; broken connection to server could trigger an endless loop + +0.63 +---- + + - build fixes, only relevant to developers and people who had problems building + +0.62 +---- + + - JUMP command in generic frontend accepts offsets/positions in seconds (JUMP 4s vs. JUMP 4) + - initial support for ICY meta data in SHOUTcast streams + - a bit of fixing with rva code, added rva and general volume control to generic frontend + - accepting more MIME types for http streaming (application/pls and audio/x-mpeg) + - ID3v2 info output taking less space per default - more resembling the old ID3v1 view for short tags, full view with always one line per item via extra --long-tag switch + - generally less verbosity (i.e. noise on console) per default + - ID3v2 now having some kind of support for unicode; trying to print what's latin1-compatible and prevent messing up of terminal with unknown bytes + - several bug fixes and small improvements + +0.61 +----- + +- improved AltiVec code from Taihei Monma +- an i486 optimization by Petr Salinger +- improving interactive experience (terminal, frontends) + -> prevent/lessen bad effect after seeking while paused + -> show targeted position while seeking in terminal mode while paused + -> not messing up terminal on unexpected errors +- decoder robustness - better file sync (weird junk at beginning, some vbr frames) +- build system improvements: + -> fixing configure isses on some platforms + -> adding cygwin, kfreebsd +- extended fix for CVE-2006-1655 +- generic code should compiling again... + +0.60 final (The Team!) +----- + +- no functional changes + +0.60-beta6 (Thomas Orgis) +----- + +- more use of ID3v2 tags, mpg123 now displays both (merged) info from ID3v2 and ID3v1; trying to support both ID3v2.3 and ID3v2.4, but ignoring encoding (UTF8 should still work if your terminal supports it, straight unicode should work except for parsing genre numbers and multiline strings) + +0.60-beta5 (Thomas Orgis) +----- + +- more robust playlist support: + -> path/url length not limited to 1023 characters anymore + -> reading in of whole playlist at program start (old operation was not really safe with playlist from http) + -> fixed bug where reading of playlist form stdin caused segfault (introduced with the pls format support) +- smaller cleanups, screen output cosmetics + +0.60-beta4 (Nicholas Humfrey & Thomas Orgis) +----- + +- proper seeking, also for VBR streams +- real two-way seeking in remote control mode at all +- better estimates of remaining frames (on vbr files), exact if Xing header is found +- Removed libao support (as it is GPL and we aren't - and we don't need it with native Alsa) +- Added ALSA 0.9/1.0 support by Clemens Ladisch (old alsa is in audio_alsa05.c but will most likely vanish soon) +- Added PortAudio audio-output support +- Added SDL audio-output support +- Fixed NAS audio-output support +- re-enabled MPEG 2.5, code just seems to work +- improved stream checking; being more willing in general (favor resync instead of bail out) but directly give up if free format stream is obvious +- Whee! Initial Relative Volume Adjustment (buzz) support with reading of ReplayGain values in lame/info tag, the RVA2 frames in ID3v2.4, ID3v2 TXXX tags from foobar2000 (please test, someone!) and custom ID3v2.3 comments entitled RVA / RVA_ALBUM / RVA_AUDIOPHILE / RVA_RADIO / RVA_MIX +- more persistence in trying to get http streams + +0.60-beta3 (Thomas Orgis) +----- + +- fixed bug with segfault in http code on stream from live365.com - bug id 1529266 +- made http request HTTP/1.0 compilant again (tested only without proxy) - bug id 1529319 +- now using http content-type header to check for correct types mpg123 can understand + -> you can now always use -@ for a single http resource (direct stream or playlist) since a stream will be reopened based on MIME type, + though omitting it will save you one http request to the server in the direct stream case... +- now simple parsing of shoutcast pls playlists (how did you people use shoutcast before?) +- playlist mode enhanced with selective playback of one entry in list (--listentry parameter) + + +0.60-beta2 (Thomas Orgis) +----- + +- fixed bug in terminal control mode that caused the f key to quit program isntead of advance to next file (introduced by the first attempt to restore "normal" Ctrl+C behaviour in terminal control mode) + +0.60-beta1 (Thomas Orgis & Nicholas Humfrey) +----- + +On the way to the first new offical realease since years! + +- new license: all LGPL except the old audio_alsa.c +- merge with Nicholas' sourceforge package + - autooled configure/make system + - MacOSX, Jack, libao (alsa 0.9/1.x support through that) +- experimental gapless playback for layer 3 +- merged in MMX and AltiVec optimizations +- security bug fix of GLSA 200607-01 and catching possible crashes found by fuzzing +- fixed many issues here and there +- polished help messages, updated man page... + +UNDERGROUND 0.59r-thor7 (well, I'm going to release a _really_ official mpg123 in future) (Thomas Orgis ) +----- + +- applied relevant stuff from Debian's 22: + - fix for CVE-2006-1655 (buffer overflow in III_i_stereo()) + - strict aliasing hack in WRITE_SAMPLE of decode_i386.c + - fixed http streaming through proxy by actually using the request url... + - buffer resync on Ctrl-C (cleaning, reducing pauses with multiple files) + - removed unused esdserver variable from mpg123.h + - did NOT apply the Debian Makefile/manpage changes (going to rewrite that stuff anyway) +- made the netbsd-i386 targets visible as netbsd-x86 + +UNOFFICIAL 0.59r-thor6 (Thomas Orgis ) +----- + +- split nedbsd targets for realtime priority selection code; since one needs -lpthread with it. standard netbsd target doesn't use realtime code -- I won't recommend running mpg123 as root anyway! + +UNOFFICIAL 0.59r-thor5 (Thomas Orgis ) +----- + +- Separated the the use of char* equalfile as filename from the use as TRUE/FALSE flag by introducing int have_eq_settings. Compilers kept nagging about assigning and integer (TRUE) to char* ... and it feels more right this way. + +- Made control_generic aware of real being possibly different than float (seq command used to raise an FPE on OSF1 when this assumption was not the case. + +- Fixed the command line arg parsing to work properly on Alpha (32 and 64 bit mixup) + +UNOFFICIAL 0.59r-thor4 (Thomas Orgis ) +----- + +- merged with 0.59r-19 from Debian project (Daniel Kobras ), hopefully fixing all those security vulnerabilities + -> my dirty http_open and open_stream variants now replaced by more proper code + -> still my (rather workloaded) parsing/processing in control_generic, but now including the idea to watch out for \n, \r\n and \r (or \n\r, for that matter;-) + +UNOFFICIAL 0.59r-thor3 (Thomas Orgis ) +----- + +- hacked additional variants of http_open and open_stream that return errors instead of exit()ing; makes more sense when used by a frontend +- further cleanup (and return to using continue instead of nested if(){}else{if()else{}}) in command processing, better error messages there + +UNOFFICIAL 0.59r-ThOr(remote-err,eq,flushing) (Thomas Orgis ) +----- +-added audio_flush() calls to various places in control_generic.c to make sure there is nothing left in there that hurts later (not sure if this has effects) +-(re?)enabled (?) code for stream info +-corrected answer of JUMP (now gives actual reached position, +/- 1 frame since I'll still have to figure out what frame 0 really is...) + +UNOFFICIAL 0.59r-realeq-remoteerr: (Thomas Orgis ) +----- +- applied patch from Cool Feet Audio project (nutcase@dtfm.org, see README.cfa) to use real-time equalizer in remote mode +- applied patch from AMF (amf.sourceforge.net) by Steve Grundell for remote communication not polluting the STDOUT where the audio data is read from (instead using STDERR) ... and faster seeking, maybe + The patches go not cleanly together, but rejects are trivial. Thus, a combined patch with both would makes sense. +- modified (IMHO improved) the control_generic command reading: now always making sure that the full command is read up to a mandatory \n; also reworked the application of the commands afterwards +- added SEQ command: simple eq with only 3 bands +- added SILENCE command: I don't want the playback messages when I don't read them (since my frontend is reading the STDOUT it knows what is going on) +- added SLJ command: SILENCE-LOAD-JUMP... a hack for my hacked mixplayd... maybe one should remove that again. + +0.59r: (MH) +----- +- applied audio_alib changes from Ralf Hildebrandt +- some 'paetsches' from DK +- minor optimizations in layer3 (dequantize/huffman) +- BSDOS 4.0 with gcc added to Makefile () +- Solaris-ESD patch from Ryan Prosser +- Added Frontend changes from Bertrand Petit +- more DK 'paetsches' (final dk7-clubhaus edition), includes extended term + control +- SGI audio fix for non RAD machines from Erik Mouw +- fixed ugly bug in layer3 dequant for bt==2 (may cause high frequency clitchs) +- AMD-3DNow optimizations in decode and dct64 +- OS/2 reworked from Samuel Audet (see audio_os2.c for more) +- added freebsd-esd make-entry from Daniel O'Connor (darius@guppy.dons.net.au) +- added enhanced head_check from D. Skarda <0rfelyus@atrey.karlin.mff.cuni.cz> +- applied 'xterm-title-patch' from "Wilson, Jeff D" +- more esd changes from Robert Bihlmeyer +- applied Hannu Napari's SGI audio patches +- minor changes in httpget.c and mpg123.c +- added native AIX support from Juergen.Schoew@unix-ag.uni-siegen.de +- applied playlist patch from +- more SGI audio patches from Gilles Zunino +- applied esdserver patch from Matthew Parslow +- added some fixes for control_generic + +0.59q: (MH) +------ +- ESD fixes +- minor bugfixes (DK patch ;) +- au and cdr 'support' (it's a hack) +- Fixed 'VBR' Bug in get_scale_fac1(). Thanx to for + this. (Wasn't really a VBR Bug. The new encoders just triggered it.) +- Added equalizer patch from + +0.59p: (MH) +------ +- Added mpglib (see mpglib directory) +- 'make generic' is more generic now +- Added HPUX/ALib support from Ducroquet Erwan (ducroque@ufr-info-p7.ibp.fr) +- Added EsoundD support from +- Added exp. relatime support (compile with -DSET_RT) +- Added linux-sparc patch from +- Added wav-File patch Samuel Audet +- Added SGI-RAD support from "J. Dean Brederson" +- Added sajberplay/FreeBSD patch from Chou Ye-chi +- Added 486 optimizations from Fabrice Bellard +- Added combined output devices on SUN (ie Speaker and headphones together) +- Added audio_alsa.c (under GPL license) for the ALSA sound system from + A. Hermansen and J. Kysela +- Added K6-3DNow patches from KIMURA Takuhiro +- Added MINT patches from Petr Stehlik +- Fixed minor bug for linux-i486 and mono + +0.59o: (MH) +------ +- fixed Bug with stereo streams on mono audio hardware for OSS +- fixed a bug with mono output and 1:1 (no) rate conversion +- again changes in the probe code +- fix in the buffer code for the case, that audio parameters are changing +- more changes to the flexibel rate converter, should now work when + writing to STDOUT. +- Added Andy's () float2int speed up proposal + (check WRITE_SAMPLE in decode_i386.c) .. Maybe someone wanna take the + idea and put it into the decode_i586.s part? +- Added TK3Play support from Brian Foutz + (compiles but untested) +- RIFF Header fix (according to Thomas Niederreiter's + patch) +- m68k patch from Stefan Gybas applied +- minor additional PPC changes applied +- resync and EOF hang fixed +- resync and bitrate correction relaxed +- Slightly change verbose output; added countdown + + +0.59n: (MH) +------ +- fixed shuffle bug +- added memory mapped IO for file reading +- added MPEG 2.5 12kHz and 8kHz table entry +- started flexibel rate conversion .. +- new '-Z' / '--random' option +- minor clean-up +- splitted audio file in audio system dependend smaller parts +- started system stream support (external program: system.c) +- unsigned 8 bit (instead of ulaw) is now default for 8bit operation +- Linux PPC patch from Grant Erickson applied +- added BSDi patch from Peter Berger , who reported + a failure when catching signals +- minor bug fix in the control interface for sajber jukebox +- fixed the ugly 'Ctrl-Z in buffer mode' bug .. YES ;) +- added buffer preload when underrun occurs (preload = 1/8 buffer size) +- minor SUN audio clean up + +0.59m: (MH) +------ +- Bug with RIFF header streams fixed. +- HTTP auth option patch from Henrik P Johnson +- NetBSD patch(s) added from and +- Added advanced shuffle support from Steven Tiger Lang +- fixed bug with too large big_value field +- fixed (hopefully) the bug with the '-a' option +- work-around for some pedantic compilers in fr->synth init +- some changes for the 'generic' version +- applied NAS bug-fix patch +- new (good) MPEG 2.5 tables (from Niklas Beisert) +- added WIN32 support from Tony Million +- added some bug fixes from Niklas Beisert +- fixed another ugly bug in layer3 dequantize (wrote over the border + of the 'xr' field) +- a minor HPUX clean up +- added BSD patch from Kevin Brintnall +- added Makefile.win32 +- added NAS big endian fix + + +0.59l: (MH) +------ +- simple equalizer support (to be continued) +- added NAS patch from Martin Denn +- real mono support +- added pentium optimized decode_i586 from Stefan Bieschewski +- fixed a bug in MS dequantize function + + +0.59k: (OF) +------ +- fixed "Accept" header in httpget.c +- fixed buffer overflow (causing core dumps) in httpget.c +- fixed display of song length +- fixed -b (buffer) problem on SGI / IRIX -- it definitely works now +- fixed problem when files with different sample rates where played, + it now works with -b (buffer), too +- fixed order of local variables in decode.c to work around a + compiler bug in ultrix +- fixed Makefile for ultrix +- reverted to old getbits.s (the new one could cause coredumps) +- more compact MPEG header display in non-verbose mode +- small fixes in buffer code and elsewhere + + +0.59j: (MH) +------ +- added sajber jukebox control interface (it's currently a big hack) + (see 'JUKEBOX' file for more) +- added simple rewind facility .. (only used by sajber interface at the moment) + + +0.59i: (MH) +----------- +- added front-end (remote) patch from "Brian J. Swetland" +- added OS2 patches from Niclas Lindstrom +- fixed 'rewind bug' +- added patches from Leo Broukhis +- added shuffle patch from Tillmann Steinbrecher +- added i386-getbits from M.Stekelenburg +- added fallback to 8bit if no 16bit samples support (currently linux only) +- added (slightly changed) outburst patch + from Antti Andreimann +- added 'http accept' patch from Hur TaeSung +- fixed buffer mode bug + + +0.59h: (MH) +------ +- added '--8bit' option to force 'ULAW 8 BIT' playing +- pcm buffer type changed to 'unsigned char *' +- plays 2:1 and 4:1 with the real frequency (ie 11025/22050 instead + of 44100) +- program (re)sets (changed) frequency for every frame +- buffer mode is broken + + +0.59g: (MH) +------ +- added support for MPEG 2.5 (it's a HACK!) .. mpg123 understands and plays + 2.5 but it does it wrong. (you will hear this!) +- Fixed wrong values in BandInfo struct for 32kHz mode +- Some performance improvements and minor changes and bug-fixes. +- Tried the new imdct from the maplay1.2+ (version 1.81) package. (but + it was slightly slower on my system, currently disabled) + + +0.59f: (OF) +------ +- HP-UX audio fix (provided by Damien Clermonte) +- Buffering (-b option) hopefully fixed. Please test! + + +0.59e: +------ +- added Audio MPEG 2.0 support (but near untested) (MH) + + +0.59d: (MH) +------ +- minor modifications to dct64_i386.c +- removed duplicated dependency 'dct64.o' in Makefile + + +0.59c: (OF) +------ +Another complete rework of the buffer system (-b option) + (normally uses mmap(), but it can also use SYSV-ShMem because + mmap() is broken on linux). + +0.59: (MH) +----- +extracted dct64() from decode*.c files. +some changes to dct64() and decode*.c to allow auto-increment/decrement +removed bit-counter in getbit-functions. Layer3 part2 now counts it itself. + +0.58: (OF) +----- +Bugfix: not closing the audio device caused a few samples to be lost. +Bugfix: audio_set_rate() was not called (!?!). +Additional command line options "--doublespeed" and "--halfspeed" + (couldn't find better names). See the manpage. +Complete redesign of command line options. See the manpage. +Changed the buffer algorithm (-b). I'm not sure whether it's better + or worse now. +Supports multiple files on the command line. Pressing Ctrl-C will + skip to the next MPEG file, pressing it twice within one second + will abort mpg123 completely. See the "INTERRUPT" section in the + manpage. +Support for http URLs. See also the -p option in the manpage. +Support for list files. See also the -@ option in the manpage. + +0.57: (MH) +----- +Put the downsampling code together with the full + quality decode into one binary. (new options -2to1,-4to1) +Optimizations in the dct12. +Removed the 'int' version. + +0.56: (OF) +----- +Additional command line option "-rs" to try to resync on + "broken" MPEG streams (now called "--resync" or "-y"). +Additional command line option "-b" to use audio output buffering. + See the manpage for additional information. +Changed a few variable names and some other minor fixes, so the + source compiles more cleanly (without warnings) on most + platforms (for example, the FreeBSD port compiles without + warnings using "-Wall -ansi -pedantic"). +Makefile changes: moved "solaris" to "solaris-gcc", new target + "solaris" (using Sun's SparcWorks cc, faster tha gcc!), new + targets "aix" and "generic". + +0.55: +----- +removed some obsolete code from layer3.c (MH) +changed scalefac stoing in layer3 (MH) +decode_4to1.c added again. Renamed decode_lp.c to decode_2to1.c (MH) +(both not optimized .. still expterimental) +Minor cleanups and optimizations in layer3. (MH) +Removed some (probable) minor bugs. (MH) +Changed 2**(...) scaling (and omitted a few muls) (MH) +Changed Makefile (OF) +Changed dequantize to reorder with a mapping table + (you can disable this by undefining MAP in layer3.c) (MH) +removed the 'dummy' scale step for mixed mode (MH) +Changed copy policy (MH) +Modified dequant-reorder-mapping (MH) + +0.54: (MH) +----- +Minor changes in the documents .. +huffman.c: x->len,y->len removed .. always '15' for the important cases +audio.c: some additions to the SOLARIS audio code + +0.53b: (OF) +------ +Makefile: + + Renamed SPARC10 to SUNOS (which is more appropriate). + Tested with SunOS 4.1.4 on a SPARCstation SLC, 20 MHz + (322% CPU, so no realtime decoding). + Added SOLARIS. Tested with Solaris 2.5.1 on an Ultra 1, + 167 MHz (14% CPU), a SPARCstation 5, 110 MHz (47% CPU), + and a SPARCstation 10, 33 MHz (68% CPU). + Added FreeBSD. Tested with 2.1.7 on a Pentium-90 (38% CPU) + and 2.2 on a Pentium-166 (20% CPU). + Added Digital Unix. Tested with DU 3.2 on a DEC 3000/500 + (Alpha AXP 150 MHz, 33% CPU). Does not support DEC's + audio interface ("AudioFile"), decodes to stdout only. + Improved "clean" target to remove core files and editor + backup files. + Added "install" target. + Added "dist" target to create a .tar.gz file of the source + directory. + + In the distributed Makefile, all system sections are + commented out. When you type "make" without uncommenting + one of the sections, an appropriate error message will + be displayed. + +audio.c + + Fixed problem when opening /dev/audio on Solaris: + I had to remove O_NDELAY, because writing to /dev/audio + didn't block until the requested number of samples + could be written, but instead it wrote only as much + samples as it was able too. Sounded funny. Removing + O_NDELAY fixed the problem. I don't think that it + hurts SunOS either, so I didn't make another #ifdef. + +common.c + + Fixed bug by adding function finish_output(): + The decoder writes the audio samples into a buffer, and + each time the buffer is full, it is written to the + audio device (or to stdout). But when the decoding is + done, there are some samples left in the buffer which + aren't written yet -- they were just discarded. + This additional function fixes the problem by writing + the remaining samples from the buffer. It is called + immediately after the main frame loop in mpg123.c. + +decode*.c + + Fixed compiler warning on symbol "div": + Some compilers issue warnings because the symbol div is + already used for something else (see "man div"), so I + changed it to "divv". + +layer*.c + + Functions do_layer*: + Moved the declaration for audio_play_samples into + mpg123.h. Makes the code cleaner. + + I moved the variables pcm_samples and pcm_point to + common.c, so they are shared between all modules. This + was necessary because the finish_output() function + (see common.c above) needs to access them. + + Renamed loop variables "i" and "j" to "k" in order to + fix compiler warnings for duplicate/hidden symbols + (similar to "div" in decode*.c, see above). + + Changed the preprocessor symbol AUDIOBUFSIZE into a + global variable "audiobufsize". This makes it possible + to change it by a command line option. + +layer1.c + + Fixed error in function I_step_one, second parameter: + unsigned int scale_index[2][] --> ...[2][SBLIMIT] + This caused an error with the DU compiler (which is ok, + because [2][] is incorrect according to ANSI). I don't + know whether [2][SBLIMIT] actually works correctly (I + have no layer-1 streams to test it), but at least it + compiles without error, and it appears to be correct + (looking at the rest of the source). Heaven knows why + gcc doesn't issue an error, and what it actually makes + from it. + +mpg123.1 + + A simple manual page. Type "nroff -man mpg123.1 | more" + to view it, or install it in /usr/local/man/man1 (this is + done automatically by "make install"). + +mpg123.c + + New boolean variable "quiet": + If this variable is set to TRUE (command line option + -q), no messages are printed. + +*** + diff --git a/deps/mpg123/NEWS.libmpg123 b/deps/mpg123/NEWS.libmpg123 new file mode 100644 index 0000000..67ce8cd --- /dev/null +++ b/deps/mpg123/NEWS.libmpg123 @@ -0,0 +1,133 @@ +Changes in libmpg123 libtool interface versions... + +36.0.36 + - Extended MPG123_RESYNC_LIMIT to initial header search. + - Not cutting decoder delay unconditionally anymore (only in combination with known encoder delay / padding). + +35.0.35 + - Added mpg123_meta_free(). + +34.0.34 + - Added flag MPG123_AUTO_RESAMPLE. + - Changed (improved;-) outbuffer behaviour. + +33.0.33 + - Added MPG123_BUFFERFILL. + +32.0.32 + - Added mpg123_framepos() + +31.0.31 + - Added mpg123_framedata() and MPG123_IGNORE_INFOFRAME. + +30.0.30 + - Added MPG123_FEEDPOOL and MPG123_FEEDBUFFER. + +29.0.29 + - New decoder: ARM neon. + - Added support for 24 bit output (dumb byte-chopping of 32 bit output). + +28.0.28 + - Add mpg123_strlen(). + +27.0.27 + - Implictly disable seeking on streams when client enforced ICY parsing. + This helps debugging dumps of http streams. + +26.0.26 + - Added mpg123_encsize(). + - Added flag MPG123_SKIP_ID3V2. + +25.0.25 + - Version increase to mark the point where the split between normal and large-file-enabled library vanishes again. The world did not like it. + Now Thomas lost some days of recreation and sleep to give it a dual-mode libmpg123 on large-file-sensitive systems. + +24.0.24 + - Introduce mpg123_replace_reader_handle() and mpg123_open_handle() + ... this is also in preparation for the next version which will drop the separated large-file library again, due to public display of dismay. + - Add the experimental mpg123_framebyframe_decode to the off_t-sensitive functions. + +23.0.23 + - Version increase to mark the point where the explicit split between normal and large-file-enabled library has been introduced. + +22.0.22 + - Experimental framebyframe API added. + +21.0.21 + - Added support of unicode file names under windows via UTF-8 argument to mpg123_open. + - Added mpg123_feature(), for example to test for the above behaviour. + +20.0.20 + - New flag: MPG123_PLAIN_ID3TEXT + - Corresponding text encoding handling API added: + mpg123_enc_from_id3, mpg123_store_utf8 + +19.0.19 + - Hm, what was it exactly now... there are candidates: + - runtime dithering + - free format + - ARM optimizations + +18.0.18 + - new parameter: MPG123_PREFRAMES is now tunable (the number of frames to decode and skip before a seek point), also default value increased + +17.0.17 + - introduction optimized stereo synths + +16.0.16 + - introducing floating point x86-64 SSE synth + +15.0.15 + - first addition of x86-64 SSE optimizations + +14.0.14 + - the first libmpg123 with actually working MPG123_UPSPEED + - also important regression fix concerning skipping of frames + +13.0.13 + - The whole set of output formats is generally available (8, 16 and 32 bit integer, signed/unsigned, float) + - Many features can be absent from libary as build decision (minimize binary size). + +12.0.12 + - added mpg123_current_decoder + - fixed value of MPG123_ENC_FLOAT + - float output now is a real runtime option + +11.0.11 + - added mpg123_getstate + - run-time tunable frame index + - officially configured with largefile support where available + +10.0.10 + - new flag MPG123_FUZZY (along with the fuzzy seek functionality) + +9.0.9 + - added mpg123_tell_stream + +8.0.8 + - added mpg123_get_eq + +7.0.7 + - added mpg123_set_filesize + +6.0.6 + - added mpg123_icy2utf8 + +5.0.5 + - added mpg123_feed + - input buffers now const + +4.0.4 + - extended mpg123_string api (mpg123_add_substring, mpg123_grow_string) + +3.0.3 + - Initial floating point support as compile-time option. + +2.0.2 + - New flag MPG123_SEEKBUFFER. + +1.0.1 + - Added MPG123_RESYNC_LIMIT parameter. + - Added MPG123_OUT_OF_SYNC and MPG123_RESYNC_FAIL error codes. + - Fix for uninitialized framesize value in handle. + diff --git a/deps/mpg123/README b/deps/mpg123/README new file mode 100644 index 0000000..830b0ab --- /dev/null +++ b/deps/mpg123/README @@ -0,0 +1,203 @@ +* * * * * * * * * * * * * * * * * * * * * * * * * * * * +* mpg123 - MPEG 1.0/2.0/2.5 audio player * +* README for version 1.x.y, dated at 14.06.2009 * +* * +* ...still the fastest MPEG audio player for UNIX ;) * +* * * * * * * * * * * * * * * * * * * * * * * * * * * * +(This file has very long lines - die-hard terminal nostalgists can be satisfied by `fmt -s -w 75 < README | less`. I think it's better to let the reader's preference rule than to preformat the stuff to some arbitrary width.) + + +0. Stuff + +For building/installation info see INSTALL. + +The mpg123 project was started by Michel Hipp and is now being maintained by Thomas Orgis and Nicholas J. Humfrey, who initiated the Sourceforge project. +The source code contains contributions from quite a few people - see AUTHORS for more info. +It is Open Source software licensed mostly under the LGPL with some parts restricted to GPL. See COPYING for details. +As for every mp3 player, some of mpg123's functionality may be covered by patents in a country where these are valid. See PATENTS for details. + +Project's official website URL is + + http://mpg123.org +(or http://mpg123.orgis.org as fallback address if there is a problem with the DNS forwarding) + +for the traditional home page and + + http://sourceforge.net/projects/mpg123 + +for sourceforge.net based services like download mirrors, mailing lists and bug/feature trackers. +Please use the sourceforge download mirrors when possible to minimize load on the mpg123.org server. + + +1. Introduction + +This is a console based decoder/player for mono/stereo mpeg audio files, probably more familiar as MP3 or MP2 files. +It's focus is speed. We still need some low-end benchmarks for the current version, but playback should be possible even on i486 CPUs. There is hand-optimized assembly code for i586, MMX, 3DNow, SEE and 3DNowExt instructions, while generic code runs on a variety of different platforms and CPUs. +It can play MPEG1.0/2.0/2.5 layer I, II, II (1, 2, 3;-) files (VBR files are fine, too) and produce output on a number of different ways: raw data to stdout and different sound systems depending on your platform (see INSTALL). +Most tested are Linux on x86 and Alpha/AXP and MacOSX on ppc as the environments the current developers work in. +We are always thankful for user reports on success (and failure) on any platform! + + +2. Contact + +short: + + mpg123-devel@lists.sourceforge.net + mpg123-users@lists.sourceforge.net +or + maintainer@mpg123.org + +long: see doc/CONTACT + + +3. Interface/Usage + +Please consult the manpage mpg123(1). Some starter info follows. + +3.1 Simple Console Usage + +Mpg123 is a console program - normally it just plays a list of files you specify on command line and that's it. See the included manpage or + + mpg123 --help + +or, for the full story, + + mpg123 --longhelp + +on command line syntax/options. I encourage you to check out the --gapless and --rva-album/--rva-mix options:-) + +In the simple "mpg123 file1.mp3 file2.mp3" mode, the only thing you can do to interact is to press Ctrl+C to skip to next track or end the whole playback if pressing it twice. + +Note that this Ctrl+C behaviour is special to this mode; when any of the following is activated, Ctrl+C will just kill the program like you would expect normally (this changed from earlier versions). + +3.2 Advanced Console Usage + +You can specify the option -C to enable a terminal control interface enabling to influence playback on current title/playlist by pressing some key: + + -= terminal control keys =- +[s] or [ ] interrupt/restart playback (i.e. 'pause') +[f] next track +[d] previous track +[b] back to beginning of track +[p] pause while looping current sound chunk +[.] forward +[,] rewind +[:] fast forward +[;] fast rewind +[>] fine forward +[<] fine rewind +[+] volume up +[-] volume down +[r] RVA switch +[v] verbose switch +[l] list current playlist, indicating current track there +[t] display tag info (again) +[m] print MPEG header info (again) +[h] this help +[q] quit + +You can change these bindings to key to your liking by modifying term.h . + +Note: This interface needs not to be available on _every_ platform/build. + +Another note: The volume up and down is performed by changing the scale factor (like the -f parameter) ... so the audio is scaled digitally in the given range of the output format (usually 16bits). That means the lowering the volume will decrease the dynamic range and possibly lessen the quality while increasing volume can in fact increase the dynamic range and thus make it better, if you deal with a silent source and no clipping is necessary. +It is a good idea to use RVA values stored in the file for adjusting low volume files, though - mpg123 handles that in addition to your volume setting. + +3.3 Control Interface for Frontends + +There used to be several interfaces for frontends left over from that past, but only one of them remains for the present and future: + + The Generic Control Interface + +It contains of communication of textual messages via standard input to mpg123 and responses to standard output unless the -s switch for output of audio data on stdout is used - then the responses come via stderr. + +See doc/README.remote for usage. + + +4. Speed + +mpg123 is fast. Any faster software player is probably based on some hacked mpg123;-) +MPlayer included mpg123 source code in it's mp3lib and we have to be thankful for the MPlayer folks adding SSE, 3DNowExt and AltiVec optimizations over the years, which we were able to backport. + +mpg123 includes the AltiVec optimization since version 0.61 and the SSE and 3DNowExt optimizations since 0.66 . +Also, version 0.66 adds the merged x86 optimization build, which includes every applicable optimization for x86 cpus except the one for i486, wich is a bit special. + +Now mpg123 catched up with MPlayer's mp3lib concerning decoding speed on my Pentium M (which supports SSE): +Decoding a certain album (Queensryche's Rage for Order) to /dev/null took 22.4s user time with mpg123-0.66 compared to 24.7s with MPlayer-1.0rc1 . + +Also, beginning with mpg123 1.8.0, there are fresh x86-64 SSE optimizations (provided by Taihei Monma) which make mpg123 the fastest MPEG audio decoder in my knowledge also on current 64bit x86 systems. + +5. Accuracy + +The mpg123 engine is able to decode in full compliance to ISO/IEC 11172-3, for all three layers, using floating point or integer math (the latter since 1.8.1). +Accuracy of 16bit output depends on specific optimization in use and compile-time choice about the rounding mode (which is performance relevant). + +The ISO test suite is incorporated in the mpg123 subversion repository under svn://orgis.org/mpg123/test, nightly tests of a build (with high-quality 16bit rounding) are published on the mpg123 website. + +Dithered 16bit output is available as an option (the --cpu choices ending with _dither). See + + http://dither123.dyndns.org + +on the whereabouts. + +6. History + +A looooong time ago (mid-90s), Michael Hipp wrote some initial mpg123 and made it _the_ Unix console mp3 player in the following years. +The exact date of birth is fuzzy in human memory, but according to the master himself (Michael) mpg123 started in 1994 as an MP2 player which a year later, 1995, gained MP3 ability. +The core decoder files have mostly 1995 as their birth year listed, so one can say that mpg123 as the layer1,2,3 player was born in 1995. +In any case, that is a looooong time ago for a media player - especially for one that is still alive! + +This is the historic description: + + This isn't a new player. It's a fully rewritten version originally based + on the mpegaudio (FHG-version) package. The DCT algorithm in the + synthesis filter is a rewritten version of the DCT first seen in the maplay + package, which was written by Tobias Bading (bading@cs.tu-berlin.de). The + rewrite was necessary, because the GPL may not allow this copyright mix. + The mpegaudio package was written by various people from the MPEG/audio + software simulation group. The maplay is under GPL .. You can find the + original source code and the mpegaudio package on: ftp.tnt.uni-hannover.de. + + Especially layer3.c common.c and mpg123.h is based on the dist10 package. + The code is fully rewritten but I'm using sometimes the + same variable names or similar function names as in the + original package. + + In the current layer3.c I'm using a DCT36 first seen in Jeff Tsay's + (ctsay@pasteur.eecs.berkeley.edu) maplay 1.2+ package. His code is + under GPL .. I also tried the enhancement from Mikko Tommila. His + code is also in layer3.c (but it's disabled at the moment, because + it was slightly slower than the unrolled 9 point DCT (at least on + _my_ system)). Theoretically it should be faster. You may try it on + your system. + +Well, that's how it started... +Official development ceased due to the typical lack-of-time syndrome around 2002 and the free-floating patches began to seize the day. + +But before that, Michael wrote or rewrote the essential code; others contributed their bits. +The main message is: + +Code is copyrighted by Michael Hipp, who made it free software under the terms of the LGPL 2.1. + +Please see doc/ROAD_TO_LGPL, COPYING and AUTHORS for details on that. Note that the only notable legacy non-LGPL file was the old alsa output that didn't work with alsa 0.9/1.0 anymore. +Also, there has been a libao output in the betas 0.60 for a short period. Libao being generally problematic for us because of its GPL license, this output is not distributed anymore in the release packages. There is now a new, LGPLed alsa output that made both the old alsa and libao obsolete for our purposes. +So, the distributed mpg123 releases actually only contain LGPL code, but you get the other files from our subversion repository if you checkout the trunk / version tags. + +There has been quite some confusion about the licensing and "freeness" of mpg123 in the past. +The initial "free for private use, ask me when you want to do something commercial" license caused some people to avoid mpg123 and even to write a replacement mimicking the interface but using a different decoding engine - what was not actively developed for too long but entered the "free" software sections. + +The Debian (non-free section) and Gentoo distributions cared about the last stable and the last development release of mpg123 over the years with mainly applying security fixes. Thanks go to the distribution maintainers for not letting it alone to bitrot over the years. + +Thomas Orgis started to hack on mpg123 in 2004 while working on his personal audio experience with mixplayd and later DerMixD, utilizing the generic control interface. In Feb 2005, he crammed control interface improvements together with Debian's r19 fixes and released the personal fork/patch named mpg123-thor. +Little later that year, Nicholas J. Humphrey independently created the sourceforge project and released an autotooled 0.59r under official GPL flag with Debian and MacOSX fixes. +In the beginning of 2006, Thomas finally decided that he could work "officially" on mpg123 and contacted Michael Hipp for taking over maintainership. +Michael was all-positive about letting mpg123 really live again (and perhaps see version 1.0 some time;-) and also pointed at the sourceforge project that didn't see much activity since the initial release. +A lot of emails and some weeks later there was the two-developer team of Nicholas and Thomas working on merging their mpg123 variants as well as adding some features and fixes to let it shine again. + +And there we are now... + +7. End + +Have fun! +____________ +Thomas Orgis diff --git a/deps/mpg123/TODO b/deps/mpg123/TODO new file mode 100644 index 0000000..ec4de61 --- /dev/null +++ b/deps/mpg123/TODO @@ -0,0 +1,38 @@ +Things that need to be done... + +... as always, mostly outdated. + +0. Fix that ugly crash that happens sometimes when Ctrl+C-ing with jack output active: + +Program terminated with signal 11, Segmentation fault. +[New process 6293] +[New process 6291] +[New process 6292] +[New process 6284] +#0 0x00002aced607695b in memcpy () from /lib/libc.so.6 +(gdb) bt +#0 0x00002aced607695b in memcpy () from /lib/libc.so.6 +#1 0x00002aced5b4f092 in jack_ringbuffer_read () from /usr/lib/libjack.so.0 +#2 0x00000000004151dd in process_callback () +#3 0x00002aced5b4bf40 in Jack::JackClient::Execute () from /usr/lib/libjack.so.0 +#4 0x00002aced5b5f8da in Jack::JackPosixThread::ThreadHandler () from /usr/lib/libjack.so.0 +#5 0x00002aced6354fa7 in start_thread () from /lib/libpthread.so.0 +#6 0x00002aced60c802d in clone () from /lib/libc.so.6 + + +1. mpg123 could pick up new sample rates suggested by the output modules (like a jack server fixed to 96kHz) and adapt to that. + +Though the practical rates for MPEG audio are up to 48kHz ... but one could easily upsample. +Currently, we detect standard rates and resample when needed... but not new ones. + +4. Prevent ID3v2 tags from being parsed multiple times after seek. + +I need to carry a list of ID3v2 frame addresses that already have been parsed into the data structures. +Currently, this is a possible memory leak when the seek index is disabled (tag data at file beginning) or id3 data is just somewhere in the stream. +That being said, in the "normal" case, there is no leak. + +5. What's about SINGLE_MIX? +Check what is _really_ happening there, make some test file... + +6. Ensure proper operation of free format with the feeder. +MPG123_NEED_MORE needs to be propagated from the freeformat framesize guesser. diff --git a/deps/mpg123/aclocal.m4 b/deps/mpg123/aclocal.m4 new file mode 100644 index 0000000..713f790 --- /dev/null +++ b/deps/mpg123/aclocal.m4 @@ -0,0 +1,1168 @@ +# generated automatically by aclocal 1.12.2 -*- Autoconf -*- + +# Copyright (C) 1996-2012 Free Software Foundation, Inc. + +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) + +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# +# Copyright © 2004 Scott James Remnant . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# PKG_PROG_PKG_CONFIG([MIN-VERSION]) +# ---------------------------------- +AC_DEFUN([PKG_PROG_PKG_CONFIG], +[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=m4_default([$1], [0.9.0]) + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi + +fi[]dnl +])# PKG_PROG_PKG_CONFIG + +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# Check to see whether a particular set of modules exists. Similar +# to PKG_CHECK_MODULES(), but does not set variables or print errors. +# +# +# Similar to PKG_CHECK_MODULES, make sure that the first instance of +# this or PKG_CHECK_MODULES is called, or make sure to call +# PKG_CHECK_EXISTS manually +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_EXISTS], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +if test -n "$PKG_CONFIG" && \ + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then + m4_ifval([$2], [$2], [:]) +m4_ifvaln([$3], [else + $3])dnl +fi]) + + +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +# --------------------------------------------- +m4_define([_PKG_CONFIG], +[if test -n "$$1"; then + pkg_cv_[]$1="$$1" + elif test -n "$PKG_CONFIG"; then + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + else + pkg_failed=untried +fi[]dnl +])# _PKG_CONFIG + +# _PKG_SHORT_ERRORS_SUPPORTED +# ----------------------------- +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi[]dnl +])# _PKG_SHORT_ERRORS_SUPPORTED + + +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +# [ACTION-IF-NOT-FOUND]) +# +# +# Note that if there is a possibility the first call to +# PKG_CHECK_MODULES might not happen, you should be sure to include an +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +# +# +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_MODULES], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl + +pkg_failed=no +AC_MSG_CHECKING([for $1]) + +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) + +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS +and $1[]_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details.]) + +if test $pkg_failed = yes; then + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + + ifelse([$4], , [AC_MSG_ERROR(dnl +[Package requirements ($2) were not met: + +$$1_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +_PKG_TEXT +])], + [AC_MSG_RESULT([no]) + $4]) +elif test $pkg_failed = untried; then + ifelse([$4], , [AC_MSG_FAILURE(dnl +[The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +_PKG_TEXT + +To get pkg-config, see .])], + [$4]) +else + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) + ifelse([$3], , :, [$3]) +fi[]dnl +])# PKG_CHECK_MODULES + +# Copyright (C) 2002-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.12' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.12.2], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.12.2])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# Figure out how to run the assembler. -*- Autoconf -*- + +# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_PROG_AS +# ---------- +AC_DEFUN([AM_PROG_AS], +[# By default we simply use the C compiler to build assembly code. +AC_REQUIRE([AC_PROG_CC]) +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS +AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) +AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) +_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl +]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is '.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 10 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 17 + +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 6 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each '.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 + +# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. +AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 19 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.62])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[AC_DIAGNOSE([obsolete], +[$0: two- and three-arguments forms are deprecated. For more info, see: +http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +dnl Support for Objective C++ was only introduced in Autoconf 2.65, +dnl but we still cater to Autoconf 2.62. +m4_ifdef([AC_PROG_OBJCXX], +[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl +]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl +]) + +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST([install_sh])]) + +# Copyright (C) 2003-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 7 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN(['missing' script is too old or missing]) +fi +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 6 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# -------------------- +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) + +# _AM_SET_OPTIONS(OPTIONS) +# ------------------------ +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 9 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) + +# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor 'install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in "make install-strip", and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of '-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([m4/addrconfig.m4]) +m4_include([m4/libtool.m4]) +m4_include([m4/ltoptions.m4]) +m4_include([m4/ltsugar.m4]) +m4_include([m4/ltversion.m4]) +m4_include([m4/lt~obsolete.m4]) diff --git a/deps/mpg123/configure b/deps/mpg123/configure new file mode 100755 index 0000000..20155ee --- /dev/null +++ b/deps/mpg123/configure @@ -0,0 +1,20267 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.69 for mpg123 1.14.4. +# +# Report bugs to . +# +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1 + + test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and +$0: mpg123-devel@lists.sourceforge.net about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + +SHELL=${CONFIG_SHELL-/bin/sh} + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='mpg123' +PACKAGE_TARNAME='mpg123' +PACKAGE_VERSION='1.14.4' +PACKAGE_STRING='mpg123 1.14.4' +PACKAGE_BUGREPORT='mpg123-devel@lists.sourceforge.net' +PACKAGE_URL='' + +ac_unique_file="src/mpg123.c" +ac_unique_file="doc" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_header_list= +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS +LIBOBJS +WIN32_CODES_FALSE +WIN32_CODES_TRUE +OUTPUT_LDFLAGS +OUTPUT_LIBS +OUTPUT_CFLAGS +OUTPUT_MOD +OUTPUT_OBJ +HAVE_DUMMY_FALSE +HAVE_DUMMY_TRUE +DUMMY_CFLAGS +DUMMY_LDFLAGS +DUMMY_LIBS +HAVE_OPENAL_FALSE +HAVE_OPENAL_TRUE +OPENAL_CFLAGS +OPENAL_LDFLAGS +OPENAL_LIBS +HAVE_MINT_FALSE +HAVE_MINT_TRUE +MINT_CFLAGS +MINT_LDFLAGS +MINT_LIBS +HAVE_SGI_FALSE +HAVE_SGI_TRUE +SGI_CFLAGS +SGI_LDFLAGS +SGI_LIBS +HAVE_OS2_FALSE +HAVE_OS2_TRUE +OS2_CFLAGS +OS2_LDFLAGS +OS2_LIBS +HAVE_HP_FALSE +HAVE_HP_TRUE +HP_CFLAGS +HP_LDFLAGS +HP_LIBS +HAVE_ARTS_FALSE +HAVE_ARTS_TRUE +ARTS_CFLAGS +ARTS_LDFLAGS +ARTS_LIBS +HAVE_ALIB_FALSE +HAVE_ALIB_TRUE +ALIB_CFLAGS +ALIB_LDFLAGS +ALIB_LIBS +HAVE_AIX_FALSE +HAVE_AIX_TRUE +AIX_CFLAGS +AIX_LDFLAGS +AIX_LIBS +HAVE_NAS_FALSE +HAVE_NAS_TRUE +NAS_CFLAGS +NAS_LDFLAGS +NAS_LIBS +HAVE_SDL_FALSE +HAVE_SDL_TRUE +SDL_LDFLAGS +HAVE_PULSE_FALSE +HAVE_PULSE_TRUE +PULSE_LDFLAGS +HAVE_PORTAUDIO_FALSE +HAVE_PORTAUDIO_TRUE +PORTAUDIO_CFLAGS +PORTAUDIO_LDFLAGS +PORTAUDIO_LIBS +HAVE_JACK_FALSE +HAVE_JACK_TRUE +JACK_LDFLAGS +HAVE_ESD_FALSE +HAVE_ESD_TRUE +ESD_LDFLAGS +HAVE_WIN32_FALSE +HAVE_WIN32_TRUE +WIN32_CFLAGS +WIN32_LDFLAGS +WIN32_LIBS +HAVE_SUN_FALSE +HAVE_SUN_TRUE +SUN_CFLAGS +SUN_LDFLAGS +SUN_LIBS +HAVE_SNDIO_FALSE +HAVE_SNDIO_TRUE +SNDIO_CFLAGS +SNDIO_LDFLAGS +SNDIO_LIBS +HAVE_COREAUDIO_FALSE +HAVE_COREAUDIO_TRUE +COREAUDIO_CFLAGS +COREAUDIO_LDFLAGS +COREAUDIO_LIBS +HAVE_OSS_FALSE +HAVE_OSS_TRUE +OSS_CFLAGS +OSS_LDFLAGS +OSS_LIBS +HAVE_ALSA_FALSE +HAVE_ALSA_TRUE +ALSA_CFLAGS +ALSA_LDFLAGS +ALSA_LIBS +SDL_LIBS +SDL_CFLAGS +ESD_LIBS +ESD_CFLAGS +PULSE_LIBS +PULSE_CFLAGS +JACK_LIBS +JACK_CFLAGS +PKG_CONFIG +DECODER_LOBJ +DECODER_OBJ +INCLUDE_SYS_TYPE_H +INCLUDE_STDLIB_H +INCLUDE_STDIO_H +LFS_LOBJ +EXEC_LT_LDFLAGS +LT_LDFLAGS +MODULE_OBJ +HAVE_MODULES_FALSE +HAVE_MODULES_TRUE +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +MANIFEST_TOOL +RANLIB +ac_ct_AR +AR +LN_S +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +SED +LIBTOOL +OBJDUMP +DLLTOOL +AS +EGREP +GREP +CPP +am__fastdepCCAS_FALSE +am__fastdepCCAS_TRUE +CCASDEPMODE +CCASFLAGS +CCAS +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +am__nodep +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +API_VERSION +LIBMPG123_VERSION +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_dependency_tracking +enable_modules +enable_static +enable_shared +with_pic +enable_fast_install +with_gnu_ld +with_sysroot +enable_libtool_lock +enable_debug +enable_nagging +enable_gapless +enable_fifo +enable_ipv6 +enable_network +enable_id3v2 +enable_string +enable_icy +enable_ntom +enable_downsample +enable_feeder +enable_messages +enable_int_quality +enable_16bit +enable_8bit +enable_32bit +enable_real +with_cpu +enable_buffer +enable_newoldwritesample +enable_layer1 +enable_layer2 +enable_layer3 +with_audio +with_default_audio +with_optimization +with_seektable +with_module_suffix +enable_largefile +enable_lfs_alias +enable_feature_report +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CCAS +CCASFLAGS +CPP +PKG_CONFIG +JACK_CFLAGS +JACK_LIBS +PULSE_CFLAGS +PULSE_LIBS +ESD_CFLAGS +ESD_LIBS +SDL_CFLAGS +SDL_LIBS' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures mpg123 1.14.4 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/mpg123] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of mpg123 1.14.4:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build + --enable-modules=no/yes dynamically loadable output modules + --enable-static[=PKGS] build static libraries [default=no] + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + --enable-debug=no/yes turn on debugging + --enable-nagging=no/yes turn on GCC's pedantic nagging with error on warnings, also enables debugging + --enable-gapless=no/yes turn on gapless (enabled per default) + --enable-fifo=no/yes FIFO support for control interface (auto-enabled on linux) + --enable-ipv6=no/yes IPv6 support (actually any protocol your libc does with getaddrinfo) + --enable-network=no/yes network support (http streams / webradio) + --disable-id3v2=no/yes no ID3v2 parsing + --disable-string=no/yes no string API (this will disable ID3v2; main mpg123 won't build anymore) + --disable-icy=no/yes no ICY metainfo parsing/conversion (main mpg123 won't build!) + --disable-ntom=no/yes no flexible resampling + --disable-downsample=no/yes no downsampled decoding + --disable-feeder=no/yes no feeder decoding, no buffered readers + --disable-messages=no/yes no error/warning messages on the console + --enable-int-quality=yes/no use rounding instead of fast truncation for integer output, where possible + --disable-16bit=no/yes no 16 bit integer output + --disable-8bit=no/yes no 8 bit integer output + --disable-32bit=no/yes no 32 bit integer output (also 24 bit) + --disable-real=no/yes no real (floating point) output + --enable-buffer=yes/no disable audio buffer code (default uses system whitelist... proper checks later) + --enable-newoldwritesample=no/yes enable new/old WRITE_SAMPLE macro for non-accurate 16 bit output, faster on certain CPUs (default on on x86-32) + --disable-layer1=no/yes no layer I decoding + --disable-layer2=no/yes no layer II decoding + --disable-layer3=no/yes no layer III decoding + --disable-largefile omit support for large files + --disable-lfs-alias disable alias wrappers for largefile bitness (mpg123_seek_32 in addition to mpg123_seek, mpg123_seek_64 as alias on x86-64) + --disable-feature_report Disable feature report function + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). + + --with-cpu=generic_fpu Use generic processor code with floating point arithmetic + --with-cpu=generic_float Plain alias to generic_fpu now... float output is a normal runtime option! + --with-cpu=generic_nofpu Use generic processor code with fixed point arithmetic (p.ex. ARM, experimental) + --with-cpu=generic_dither Use generic processor code with floating point arithmetic and dithering for 1to1 16bit decoding. + --with-cpu=i386_fpu Use code optimized for i386 processors with floating point arithmetic + --with-cpu=i386_nofpu Use code optimized for i386 processors with fixed point arithmetic (experimental) + --with-cpu=i486 Use code optimized for i486 processors (only usable alone!) + --with-cpu=i586 Use code optimized for i586 processors + --with-cpu=i586_dither Use code optimized for i586 processors with dithering (noise shaping), adds 256K to binary size + --with-cpu=3dnow Use code optimized for 3DNow processors + --with-cpu=3dnowext Use code optimized for 3DNowExt processors (K6-3+, Athlon) + --with-cpu=3dnowext_alone Really only 3DNowExt decoder, without 3DNow fallback for flexible rate + --with-cpu=mmx Use code optimized for MMX processors + --with-cpu=mmx_alone Really only MMX decoder, without i586 fallback for flexible rate + --with-cpu=sse Use code optimized for SSE processors + --with-cpu=sse_alone Really only SSE decoder, without i586 fallback for flexible rate + --with-cpu=x86 Pack all x86 opts into one binary (excluding i486, including dither) + --with-cpu=x86-64 Use code optimized for x86-64 processors (AMD64 and Intel64, including dithered generic) + --with-cpu=altivec Use code optimized for Altivec processors (PowerPC G4 and G5) + --with-cpu=ppc_nofpu Use code optimized for PowerPC processors with fixed point arithmetic (experimental) + --with-cpu=neon Use code optimized for ARM NEON SIMD engine (Cortex-A series) + --with-cpu=arm_nofpu Use code optimized for ARM processors with fixed point arithmetic (experimental) + + + --with-audio= Select a list (or only one) of audio output modules (comma or space separated list). + + + --with-default-audio=aix Use AIX as default audio output sub-system + --with-default-audio=alib Use Alib as default audio output sub-system (for HPUX) + --with-default-audio=alsa Use ALSA as default audio output sub-system + --with-default-audio=arts Use aRts as default audio output sub-system (KDE sound server) + --with-default-audio=dummy Use dummy as default audio (when no sound card is available) + --with-default-audio=esd Use ESoundD as default audio output sub-system + --with-default-audio=hp Use HP as default audio output sub-system + --with-default-audio=jack Use JACK as default low-latency audio server + --with-default-audio=coreaudio Use Mac OS X as default audio output sub-system (CoreAudio) + --with-default-audio=mint Use MinT as default audio output sub-system (Atari) + --with-default-audio=nas Use NAS as default audio output (Network Audio System) + --with-default-audio=os2 Use OS2 as default audio output sub-system + --with-default-audio=oss Use OSS as default audio output sub-system (/dev/dsp) + --with-default-audio=portaudio Use PortAudio as default audio output sub-system + --with-default-audio=pulse Use Pulse audio server as default audio output sub-system + --with-default-audio=sdl Use SDL as default audio output sub-system (Simple DirectMedia Layer) + --with-default-audio=sgi Use SGI as default audio output sub-system (IRIX) + --with-default-audio=sndio Use OpenBSD's sndio as default audio output sub-system + --with-default-audio=sun Use Sun as default audio output sub-system (/dev/audio) + --with-default-audio=win32 Use Win32 audio as default audio output sub-system + + + --with-optimization=0 No Optimization + --with-optimization=1 Limited Optimization (-O) (for gcc) + --with-optimization=2 Default Optimization (-O2 ...) (for gcc) + --with-optimization=3 More Optimize than default (-O3 ...) (for gcc) + --with-optimization=4 Optimize yet more (-O4 ...) (for gcc) + + + --with-seektable= choose size of seek index table (0 disables it), default 1000 + + + --with-module-suffix=.la (default) Use libtool's .la files for loading modules. + --with-module-suffix=.so|.dll|... Specify the native module file suffix to bypass .la files. + + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CCAS assembler compiler command (defaults to CC) + CCASFLAGS assembler compiler flags (defaults to CFLAGS) + CPP C preprocessor + PKG_CONFIG path to pkg-config utility + JACK_CFLAGS C compiler flags for JACK, overriding pkg-config + JACK_LIBS linker flags for JACK, overriding pkg-config + PULSE_CFLAGS + C compiler flags for PULSE, overriding pkg-config + PULSE_LIBS linker flags for PULSE, overriding pkg-config + ESD_CFLAGS C compiler flags for ESD, overriding pkg-config + ESD_LIBS linker flags for ESD, overriding pkg-config + SDL_CFLAGS C compiler flags for SDL, overriding pkg-config + SDL_LIBS linker flags for SDL, overriding pkg-config + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +mpg123 configure 1.14.4 +generated by GNU Autoconf 2.69 + +Copyright (C) 2012 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ------------------------------------------------- ## +## Report this to mpg123-devel@lists.sourceforge.net ## +## ------------------------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_type + +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +# -------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_c_compute_int () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid; break +else + as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) < 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=$ac_mid; break +else + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + ac_lo= ac_hi= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid +else + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in #(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval () { return $2; } +static unsigned long int ulongval () { return $2; } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + echo >>conftest.val; read $3 config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by mpg123 $as_me 1.14.4, which was +generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +as_fn_append ac_header_list " stdlib.h" +as_fn_append ac_header_list " unistd.h" +as_fn_append ac_header_list " sys/param.h" +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +API_VERSION=36 +LIB_PATCHLEVEL=6 +LIBMPG123_VERSION=$API_VERSION:$LIB_PATCHLEVEL:$API_VERSION + + + + +ac_aux_dir= +for ac_dir in build "$srcdir"/build; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in build \"$srcdir\"/build" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + + +am__api_version='1.12' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='mpg123' + VERSION='1.14.4' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + + + + + +ac_config_headers="$ac_config_headers src/config.h" + + + +# You get strange symptoms like jack module build failing because the AC_C_CONST failed to detect the working const support. +# In that case, the test failed because -Werror, not because no const there... +# After looking again, there are possibly more tests being obscured by false failures. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror in CFLAGS (It breaks tests)" >&5 +$as_echo_n "checking for -Werror in CFLAGS (It breaks tests)... " >&6; } +if echo "$CFLAGS" | grep Werror; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You have -Werror in CFLAGS. That may break some tests and make this configure bogus. +If you want paranoid compilation, use --enable-nagging option, which adds -Werror for gcc. +Also note that you shall not run make distcheck after configuring with --enable-nagging. +distcheck uses the generated CFLAGS... +Anyhow, continuing at your own risk." >&5 +$as_echo "$as_me: WARNING: You have -Werror in CFLAGS. That may break some tests and make this configure bogus. +If you want paranoid compilation, use --enable-nagging option, which adds -Werror for gcc. +Also note that you shall not run make distcheck after configuring with --enable-nagging. +distcheck uses the generated CFLAGS... +Anyhow, continuing at your own risk." >&2;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + +buffer=enabled # try to build with buffer by default + + +LT_LDFLAGS=-export-dynamic +EXEC_LT_LDFLAGS= +be_static=no +all_static=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if you are up to something totally static with LDFLAGS/CFLAGS" >&5 +$as_echo_n "checking if you are up to something totally static with LDFLAGS/CFLAGS... " >&6; } +for f in $LDFLAGS $CFLAGS +do + case "$f" in + -all-static) + be_static=yes + all_static=yes + ;; + -static) + be_static=yes + ;; + esac +done +if test "x$be_static" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + LT_LDFLAGS=-all-static + EXEC_LT_LDFLAGS="$LT_LDFLAGS" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +if test "x$all_static" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Use -static in LDFLAGS for all-static linking! Your compiler may blow up on that -all-static. " >&5 +$as_echo "$as_me: WARNING: Use -static in LDFLAGS for all-static linking! Your compiler may blow up on that -all-static. " >&2;} +fi + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +# By default we simply use the C compiler to build assembly code. + +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS + + + +depcc="$CCAS" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CCAS_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CCAS_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CCAS_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CCAS_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; } +CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then + am__fastdepCCAS_TRUE= + am__fastdepCCAS_FALSE='#' +else + am__fastdepCCAS_TRUE='#' + am__fastdepCCAS_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if ${ac_cv_c_const+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + +#ifndef __cplusplus + /* Ultrix mips cc rejects this sort of thing. */ + typedef int charset[2]; + const charset cs = { 0, 0 }; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_const=yes +else + ac_cv_c_const=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +$as_echo "#define const /**/" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if ${ac_cv_c_inline+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_inline=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if ${ac_cv_c_bigendian+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef _BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then : + # Try to guess by grepping values from an object file. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_bigendian=no +else + ac_cv_c_bigendian=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h +;; #( + no) + ;; #( + universal) + +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + + ;; #( + *) + as_fn_error $? "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + esac + + + +modules=auto +OUTPUT_OBJ="module.\$(OBJEXT)" +# Check whether --enable-modules was given. +if test "${enable_modules+set}" = set; then : + enableval=$enable_modules; + if test "x$enableval" = xyes + then + modules=enabled + else + modules=disabled + fi + +else + + if test "x$be_static" = "xyes"; then + modules=disabled + else + modules=auto + fi + +fi + + +# Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=no +fi + + + + + + + + + +# Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi + + + + + + + + + + +if test x"$enable_shared" = xno; then + modules=disabled + LT_LDFLAGS= +else + +$as_echo "#define DYNAMIC_BUILD 1" >>confdefs.h + +fi + +if test x"$modules" = xdisabled +then + echo "Modules disabled, not checking for libltdl." +else + have_ltdl=no + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dlinit in -lltdl" >&5 +$as_echo_n "checking for lt_dlinit in -lltdl... " >&6; } +if ${ac_cv_lib_ltdl_lt_dlinit+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lltdl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char lt_dlinit (); +int +main () +{ +return lt_dlinit (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ltdl_lt_dlinit=yes +else + ac_cv_lib_ltdl_lt_dlinit=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlinit" >&5 +$as_echo "$ac_cv_lib_ltdl_lt_dlinit" >&6; } +if test "x$ac_cv_lib_ltdl_lt_dlinit" = xyes; then : + ac_fn_c_check_header_mongrel "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default" +if test "x$ac_cv_header_ltdl_h" = xyes; then : + + have_ltdl=yes + +$as_echo "#define HAVE_LTDL 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found ltdl library but NOT the header file on your system" >&5 +$as_echo "$as_me: WARNING: Found ltdl library but NOT the header file on your system" >&2;} + +fi + + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ltdl library not found" >&5 +$as_echo "$as_me: WARNING: ltdl library not found" >&2;} + + +fi + + if test x"$modules" = xenabled -a x"$have_ltdl" = xno; then + as_fn_error $? "Modules enabled but no libltdl found! This will not work..." "$LINENO" 5 + fi + if test x"$modules" = xauto; then + if test x"$have_ltdl" = xyes; then + modules=enabled + echo "We found libltdl: Modules enabled." + else + echo "We did not find libltdl: Modules disabled." + modules=disabled + fi + fi +fi + +if test x"$modules" = xdisabled +then + echo "Modules disabled." +else +# Enable module support in source code + +$as_echo "#define USE_MODULES 1" >>confdefs.h + +fi + + +enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AS="${ac_tool_prefix}as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AS=$ac_cv_prog_AS +if test -n "$AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 +$as_echo "$AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AS="as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 +$as_echo "$ac_ct_AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AS" = x; then + AS="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AS=$ac_ct_AS + fi +else + AS="$ac_cv_prog_AS" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + + ;; +esac + +test -z "$AS" && AS=as + + + + + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + + +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac + + + +macro_version='2.4.2' +macro_revision='1.3337' + + + + + + + + + + + + + +ltmain="$ac_aux_dir/ltmain.sh" + +# Backslashify 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' + +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} + +case "$ECHO" in + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac + + + + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if ${ac_cv_path_FGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_FGREP" || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_FGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_FGREP=$FGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" + + +test -z "$GREP" && GREP=grep + + + + + + + + + + + + + + + + + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if ${lt_cv_path_NM+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DUMPBIN" && break + done +fi +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in dumpbin "link -dump" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_DUMPBIN" && break +done + + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DUMPBIN=$ac_ct_DUMPBIN + fi +fi + + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi + + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if ${lt_cv_nm_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +# find the maximum length of command line arguments +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if ${lt_cv_sys_max_cmd_len+:} false; then : + $as_echo_n "(cached) " >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + 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 + ;; + + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + + 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"`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } +fi +max_cmd_len=$lt_cv_sys_max_cmd_len + + + + + + +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } +lt_shell_append=no +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } + + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi + + + + + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if ${lt_cv_ld_reload_flag+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if ${lt_cv_deplibs_check_method+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix[4-9]*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +haiku*) + 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])(-bit)?( [LM]SB)? 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 glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + + + + + + + + + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + +if test -n "$ac_tool_prefix"; then + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AR" && break + done +fi +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_AR" && break +done + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +fi + +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +test -z "$STRIP" && STRIP=: + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +test -z "$RANLIB" && RANLIB=: + + + + + + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" +fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if ${lt_cv_sys_global_symbol_pipe+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK '"\ +" {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ +" /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 + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + +#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. */ +LT_DLSYM_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_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } +fi + +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + + + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then : + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if ${lt_cv_cc_needs_belf+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_cc_needs_belf=yes +else + lt_cv_cc_needs_belf=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; + *) + 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" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + fi +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi + + + + + + + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DSYMUTIL=$ac_ct_DSYMUTIL + fi +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_NMEDIT="nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NMEDIT=$ac_ct_NMEDIT + fi +else + NMEDIT="$ac_cv_prog_NMEDIT" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LIPO="${ac_tool_prefix}lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_LIPO="lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OTOOL="${ac_tool_prefix}otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OTOOL="otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL=$ac_ct_OTOOL + fi +else + OTOOL="$ac_cv_prog_OTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OTOOL64="otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if ${lt_cv_apple_cc_single_mod+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&5 + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if ${lt_cv_ld_exported_symbols_list+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_ld_exported_symbols_list=yes +else + lt_cv_ld_exported_symbols_list=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac + +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF + +fi + +done + + + + + +# Set options + + + + enable_dlopen=no + + + + + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then : + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + pic_mode=default +fi + + +test -z "$pic_mode" && pic_mode=default + + + + + + + + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then : + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi + + + + + + + + + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +test -z "$LN_S" && LN_S="ln -s" + + + + + + + + + + + + + + +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if ${lt_cv_objdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +# Use C for the default configuration in the libtool script + +lt_save_CC="$CC" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + case $cc_basename in + nvcc*) + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; + *) + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + + + + + + + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; + esac + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if ${lt_cv_prog_compiler_pic_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } + +if test x"$lt_cv_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi + + + + + + + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } + +if test x"$lt_cv_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag= + always_export_symbols=no + archive_cmds= + archive_expsym_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no + export_dynamic_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no + hardcode_libdir_flag_spec= + hardcode_libdir_separator= + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no + link_all_deplibs=unknown + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, 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 install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + export_dynamic_flag_spec='${wl}--export-all-symbols' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + haiku*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs=yes + ;; + + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-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=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_direct_absolute=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + file_list_spec='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + export_dynamic_flag_spec='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_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 "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_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 "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + fi + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac + ;; + + darwin* | rhapsody*) + + + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + + else + whole_archive_flag_spec='' + fi + link_all_deplibs=yes + allow_undefined_flag="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else + ld_shlibs=no + fi + + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler__b=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -b" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler__b=yes + fi + else + lt_cv_prog_compiler__b=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } + +if test x"$lt_cv_prog_compiler__b" = xyes; then + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' +fi + + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${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. + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo (void) { return 0; } +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + inherit_rpath=yes + link_all_deplibs=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; 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 "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + archive_cmds_need_lc='no' + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-R,$libdir' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='${wl}-Blargedynsym' + ;; + esac + fi + fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +with_gnu_ld=$with_gnu_ld + + + + + + + + + + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # 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 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # 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; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([A-Za-z]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +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 # correct to gnu/linux during the next big refactor + 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 # correct to gnu/linux during the next big refactor + 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=`func_echo_all "$lib" | $SED '\''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 # correct to gnu/linux during the next big refactor + 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,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + 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 + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + 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 + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # 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' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + 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 + ;; + +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[23].*) 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 # correct to gnu/linux during the next big refactor + 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 + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + 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=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + 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' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[3-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + 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 # correct to gnu/linux during the next big refactor + 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 glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + version_type=linux # correct to gnu/linux during the next big refactor + 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 + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # 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;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 # correct to gnu/linux during the next big refactor + 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 # correct to gnu/linux during the next big refactor + 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 # correct to gnu/linux during the next big refactor + 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 # correct to gnu/linux during the next big refactor + 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 # correct to gnu/linux during the next big refactor + 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 # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } + +if test "$hardcode_action" = relink || + test "$inherit_rpath" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = xyes; then : + lt_cv_dlopen="shl_load" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if ${ac_cv_lib_dld_shl_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes +else + ac_cv_lib_dld_shl_load=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" +else + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if ${ac_cv_lib_svld_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_svld_dlopen=yes +else + ac_cv_lib_svld_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if ${ac_cv_lib_dld_dld_link+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_dld_link=yes +else + ac_cv_lib_dld_dld_link=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "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 + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 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; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self_static+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "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 + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 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; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + + + + + + + + + + + + + + + + +striplib= +old_striplib= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +fi + + + + + + + + + + + + + # Report which library types will actually be built + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } + + + + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + + + + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + + + +if test x"$modules" = xdisabled +then + echo "Modules still disabled..." + MODULE_OBJ="legacy_module.\$(OBJEXT)" +else + MODULE_OBJ="module.\$(OBJEXT)" +fi + + if test "x$modules" = xenabled ; then + HAVE_MODULES_TRUE= + HAVE_MODULES_FALSE='#' +else + HAVE_MODULES_TRUE='#' + HAVE_MODULES_FALSE= +fi + + + + + + + +# Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then : + enableval=$enable_debug; + if test "x$enableval" = xyes + then + debugging="enabled" + else + debugging="disabled" + fi + +else + debugging="disabled" + +fi + + +# Check whether --enable-nagging was given. +if test "${enable_nagging+set}" = set; then : + enableval=$enable_nagging; + if test "x$enableval" = xyes + then + nagging="enabled" + debugging="enabled" + else + nagging="disabled" + fi + +else + nagging="disabled" + +fi + + +if test x"$debugging" = xenabled; then + +$as_echo "#define DEBUG 1" >>confdefs.h + +fi + +# Check whether --enable-gapless was given. +if test "${enable_gapless+set}" = set; then : + enableval=$enable_gapless; + if test "x$enableval" = xyes + then + gapless="enabled" + +$as_echo "#define GAPLESS 1" >>confdefs.h + + else + gapless="disabled" + fi + +else + + gapless="enabled" + +$as_echo "#define GAPLESS 1" >>confdefs.h + + + +fi + + +# Check whether --enable-fifo was given. +if test "${enable_fifo+set}" = set; then : + enableval=$enable_fifo; + if test "x$enableval" = xyes + then + fifo="enabled" + else + fifo="disabled" + fi + +else + + fifo="auto" + + +fi + + +# Check whether --enable-ipv6 was given. +if test "${enable_ipv6+set}" = set; then : + enableval=$enable_ipv6; + if test "x$enableval" = xyes + then + ipv6="enabled" + else + ipv6="disabled" + fi + +else + + ipv6="auto" + + +fi + + +# Check whether --enable-network was given. +if test "${enable_network+set}" = set; then : + enableval=$enable_network; + if test "x$enableval" = xyes + then + network="enabled" + else + network="disabled" + fi + +else + + network="auto" + + +fi + + +s_fpu= +DECODER_OBJ= +DECODER_LOBJ= + + +id3v2=enabled +# Check whether --enable-id3v2 was given. +if test "${enable_id3v2+set}" = set; then : + enableval=$enable_id3v2; + if test "x$enableval" = xno; then + id3v2="disabled" + fi + +fi + + +# id3v2 depends on strings... so check that in between. +string=enabled +# Check whether --enable-string was given. +if test "${enable_string+set}" = set; then : + enableval=$enable_string; + if test "x$enableval" = xno; then + string="disabled" + fi + +fi + + +if test "x$string" = "xdisabled"; then + +$as_echo "#define NO_STRING 1" >>confdefs.h + + id3v2=disabled + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ID3v2 support disabled because of string API being disabled." >&5 +$as_echo "$as_me: WARNING: ID3v2 support disabled because of string API being disabled." >&2;} +else + DECODER_OBJ="$DECODER_OBJ stringbuf.\$(OBJEXT)" + DECODER_LOBJ="$DECODER_LOBJ stringbuf.lo" +fi + +if test "x$id3v2" = "xdisabled"; then + +$as_echo "#define NO_ID3V2 1" >>confdefs.h + +fi + +icy=enabled +# Check whether --enable-icy was given. +if test "${enable_icy+set}" = set; then : + enableval=$enable_icy; + if test "x$enableval" = xno; then + icy="disabled" + fi + +fi + + +if test "x$icy" = "xdisabled"; then + +$as_echo "#define NO_ICY 1" >>confdefs.h + +else + DECODER_OBJ="$DECODER_OBJ icy.\$(OBJEXT) icy2utf8.\$(OBJEXT)" + DECODER_LOBJ="$DECODER_LOBJ icy.lo icy2utf8.lo" +fi + +ntom=enabled +# Check whether --enable-ntom was given. +if test "${enable_ntom+set}" = set; then : + enableval=$enable_ntom; + if test "x$enableval" = xno; then + ntom="disabled" + fi + +fi + + +if test "x$ntom" = "xdisabled"; then + +$as_echo "#define NO_NTOM 1" >>confdefs.h + +else + DECODER_OBJ="$DECODER_OBJ ntom.\$(OBJEXT)" + DECODER_LOBJ="$DECODER_LOBJ ntom.lo" +fi + +downsample=enabled +# Check whether --enable-downsample was given. +if test "${enable_downsample+set}" = set; then : + enableval=$enable_downsample; + if test "x$enableval" = xno; then + downsample="disabled" + fi + +fi + + +if test "x$downsample" = "xdisabled"; then + +$as_echo "#define NO_DOWNSAMPLE 1" >>confdefs.h + +fi + +feeder=enabled +# Check whether --enable-feeder was given. +if test "${enable_feeder+set}" = set; then : + enableval=$enable_feeder; + if test "x$enableval" = xno; then + feeder="disabled" + fi + +fi + + +if test "x$feeder" = "xdisabled"; then + +$as_echo "#define NO_FEEDER 1" >>confdefs.h + +fi + +messages=enabled +# Check whether --enable-messages was given. +if test "${enable_messages+set}" = set; then : + enableval=$enable_messages; + if test "x$enableval" = xno; then + messages="disabled" + fi + +fi + + +if test "x$messages" = "xdisabled"; then + +$as_echo "#define NO_WARNING 1" >>confdefs.h + + +$as_echo "#define NO_ERRORMSG 1" >>confdefs.h + + +$as_echo "#define NO_ERETURN 1" >>confdefs.h + +fi + +integers=fast +# Check whether --enable-int-quality was given. +if test "${enable_int_quality+set}" = set; then : + enableval=$enable_int_quality; + if test "x$enableval" = xyes; then + integers=quality + +$as_echo "#define ACCURATE_ROUNDING 1" >>confdefs.h + + fi + +fi + + +int16=enabled +# Check whether --enable-16bit was given. +if test "${enable_16bit+set}" = set; then : + enableval=$enable_16bit; + if test "x$enableval" = xno; then + int16="disabled" + fi + +fi + + +int8=enabled +# Check whether --enable-8bit was given. +if test "${enable_8bit+set}" = set; then : + enableval=$enable_8bit; + if test "x$enableval" = xno; then + int8="disabled" + fi + +fi + + +int32=enabled +# Check whether --enable-32bit was given. +if test "${enable_32bit+set}" = set; then : + enableval=$enable_32bit; + if test "x$enableval" = xno; then + int32="disabled" + fi + +fi + + +real=enabled +# Check whether --enable-real was given. +if test "${enable_real+set}" = set; then : + enableval=$enable_real; + if test "x$enableval" = xno; then + real="disabled" + fi + +fi + + + +# Check whether --with-cpu was given. +if test "${with_cpu+set}" = set; then : + withval=$with_cpu; +fi + + + +# opt-in for IEEE754 floating point action +# We want to make sure not to apply hacks relying on IEEE754 storage format on platforms where we did not make sure that this actually is valid. +# It _should_ be fine for about all computers still out there, but we play safe. +ieee=no +case $host in + i?86-*|x86_64-*|powerpc*|sparc*) + ieee=yes + ;; +esac +if test "x$ieee" = xyes; then + echo "We assume IEEE754 floating point format." + +$as_echo "#define IEEE_FLOAT 1" >>confdefs.h + +fi + +newoldwritesample=disabled +case $host in + arm*-*-linux*) + # check that... perhaps we are better off on arm with kernel math emulation + cpu_type="arm_nofpu" + ;; + i386-*-linux*|i386-*-kfreebsd*-gnu) + cpu_type="i386_fpu" + newoldwritesample=enabled + ;; + i486-*-linux*|i486-*-kfreebsd*-gnu) + cpu_type="i486" + newoldwritesample=enabled + ;; + i586-*-linux*|i586-*-kfreebsd*-gnu) + cpu_type="x86" + newoldwritesample=enabled + ;; + i686-*-linux*|i686-*-kfreebsd*-gnu) + cpu_type="x86" + newoldwritesample=enabled + ;; + x86_64-*-linux*|x86_64-*-kfreebsd*-gnu) + cpu_type="x86-64_all" + ;; + *-*-linux*|*-*-kfreebsd*-gnu) + cpu_type="generic_fpu" + ;; + i386-apple-darwin10*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CPU type supports x86-64" >&5 +$as_echo_n "checking if CPU type supports x86-64... " >&6; } + case `sysctl -n hw.optional.x86_64` in + 1) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + cpu_type="x86-64_all" + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + cpu_type="x86" + newoldwritesample=enabled + ;; + esac + ;; + i386-apple-darwin*) + cpu_type="x86" + newoldwritesample=enabled + ;; + x86_64-apple-darwin*) + cpu_type="x86-64_all" + ;; + *-apple-darwin*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CPU type supports AltiVec" >&5 +$as_echo_n "checking if CPU type supports AltiVec... " >&6; } + case `machine` in + ppc7400 | ppc7450 | ppc970) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + cpu_type="altivec" + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + cpu_type="generic_fpu" + ;; + esac + ;; + i?86-*-dragonfly* | i?86-*-freebsd* | i?86-*-midnightbsd* | i?86-*-mirbsd* | i?86-*-netbsd* | i?86-*-openbsd*) + cpu_type="x86" + newoldwritesample=enabled + ;; + x86_64-*-dragonfly* | x86_64-*-freebsd* | x86_64-*-midnightbsd* | x86_64-*-mirbsd* | x86_64-*-netbsd* | x86_64-*-openbsd*) + cpu_type="x86-64_all" + ;; + *-*-dragonfly* | *-*-freebsd* | *-*-midnightbsd* | *-*-mirbsd* | *-*-netbsd* | *-*-openbsd*) + cpu_type="generic_fpu" + ;; + i386-*-solaris*) + cpu_type=x86 + newoldwritesample=enabled + ;; + x86_64-*-solaris*) + cpu_type=x86-64_all + ;; + *-*-solaris*) + cpu_type="generic_fpu" + ;; + # os2-emx = OS/2 with some Unix fun; so p.ex. buffer works. + # Till we sorted out the assembler troubles, generic CPU is default. + i386-pc-os2-emx) + cpu_type=generic_fpu + newoldwritesample=enabled + ;; + x86_64-pc-os2-emx) + # We are optimistic hat the future knows OS/2 on x86-64;-) + cpu_type=generic_fpu + ;; + *-pc-os2-emx) + cpu_type="generic_fpu" + ;; + *-dec-osf*) + cpu_type="generic_fpu" + ;; + x86_64-pc-cygwin*) + cpu_type="x86-64_all" + ;; + i686-pc-cygwin*) + cpu_type="x86" + newoldwritesample=enabled + ;; + i586-pc-cygwin*) + cpu_type="x86" + newoldwritesample=enabled + ;; + i486-pc-cygwin*) + cpu_type="i486" + newoldwritesample=enabled + ;; + i386-pc-cygwin*) + cpu_type="i386" + newoldwritesample=enabled + ;; + *-pc-cygwin*) + cpu_type="generic_fpu" + ;; + i[3-7]86-*-mingw32*) + LIBS="$LIBS" + buffer=disabled + cpu_type="x86" + newoldwritesample=enabled + ;; + x86_64-*-mingw32*) + LIBS="$LIBS" + buffer=disabled + cpu_type="x86-64" + ;; + i386-*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown host operating system" >&5 +$as_echo "$as_me: WARNING: Unknown host operating system" >&2;} + cpu_type="i386" + buffer=disabled + ADD_CPPFLAGS="-DGENERIC $ADD_CPPFLAGS" + newoldwritesample=enabled + ;; + i486-*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown host operating system" >&5 +$as_echo "$as_me: WARNING: Unknown host operating system" >&2;} + cpu_type="i486" + buffer=disabled + ADD_CPPFLAGS="-DGENERIC $ADD_CPPFLAGS" + newoldwritesample=enabled + ;; + i586-*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown host operating system" >&5 +$as_echo "$as_me: WARNING: Unknown host operating system" >&2;} + cpu_type="x86" + buffer=disabled + ADD_CPPFLAGS="-DGENERIC $ADD_CPPFLAGS" + newoldwritesample=enabled + ;; + i686-*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown host operating system" >&5 +$as_echo "$as_me: WARNING: Unknown host operating system" >&2;} + cpu_type="x86" + buffer=disabled + ADD_CPPFLAGS="-DGENERIC $ADD_CPPFLAGS" + newoldwritesample=enabled + ;; + x86_64-*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown host operating system" >&5 +$as_echo "$as_me: WARNING: Unknown host operating system" >&2;} + cpu_type="x86-64_all" + buffer=disabled + ADD_CPPFLAGS="-DGENERIC $ADD_CPPFLAGS" + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown host operating system" >&5 +$as_echo "$as_me: WARNING: Unknown host operating system" >&2;} + cpu_type="generic_fpu" + buffer=disabled + ADD_CPPFLAGS="-DGENERIC $ADD_CPPFLAGS" + ;; +esac + +# Check whether --enable-buffer was given. +if test "${enable_buffer+set}" = set; then : + enableval=$enable_buffer; + if test "x$enableval" = xyes + then + echo "Note: Enabling buffer per request... perhaps it will not build anyway." + buffer="enabled" + else + echo "Note: Disabling buffer per request." + buffer="disabled" + fi + + +fi + + +# Check whether --enable-newoldwritesample was given. +if test "${enable_newoldwritesample+set}" = set; then : + enableval=$enable_newoldwritesample; + if test "x$enableval" = xyes + then + newoldwritesample=enabled + else + newoldwritesample=disabled + fi + +fi + + + + +if test "x$with_cpu" != "x"; then + cpu_type=$with_cpu +fi + +if test "x$cpu_type" = "xgeneric_nofpu"; then + real=disabled + int32=disabled +fi + +if test "x$cpu_type" = "xi386_nofpu"; then + real=disabled + int32=disabled +fi + +if test "x$cpu_type" = "xppc_nofpu"; then + real=disabled + int32=disabled +fi + +if test "x$cpu_type" = "xarm_nofpu"; then + real=disabled + int32=disabled +fi + +if test "x$int16" = "xdisabled"; then + +$as_echo "#define NO_16BIT 1" >>confdefs.h + +else + DECODER_OBJ="$DECODER_OBJ synth.\$(OBJEXT)" + DECODER_LOBJ="$DECODER_LOBJ synth.lo" +fi + +# 8bit works only through 16bit +if test "x$int16" = "xdisabled"; then + int8=disabled +fi +if test "x$int8" = "xdisabled"; then + +$as_echo "#define NO_8BIT 1" >>confdefs.h + +else + DECODER_OBJ="$DECODER_OBJ synth_8bit.\$(OBJEXT)" + DECODER_LOBJ="$DECODER_LOBJ synth_8bit.lo" +fi + +if test "x$int32" = "xdisabled"; then + +$as_echo "#define NO_32BIT 1" >>confdefs.h + +else + s_fpu="$s_fpu synth_s32" +fi + +if test "x$real" = "xdisabled"; then + +$as_echo "#define NO_REAL 1" >>confdefs.h + +else + s_fpu="$s_fpu synth_real" +fi + + + +layer1=enabled +# Check whether --enable-layer1 was given. +if test "${enable_layer1+set}" = set; then : + enableval=$enable_layer1; + if test "x$enableval" = xno; then + layer1="disabled" + fi + +fi + + +if test "x$layer1" = "xdisabled"; then + +$as_echo "#define NO_LAYER1 1" >>confdefs.h + +else + # layer1 needs code in layer2 + DECODER_OBJ="$DECODER_OBJ layer1.\$(OBJEXT) layer2.\$(OBJEXT)" + DECODER_LOBJ="$DECODER_LOBJ layer1.lo layer2.lo" +fi + +layer2=enabled +# Check whether --enable-layer2 was given. +if test "${enable_layer2+set}" = set; then : + enableval=$enable_layer2; + if test "x$enableval" = xno; then + layer2="disabled" + fi + +fi + + +if test "x$layer2" = "xdisabled"; then + +$as_echo "#define NO_LAYER2 1" >>confdefs.h + +else + # layer1 may have added the objects already + if test "x$layer1" = "xdisabled"; then + DECODER_OBJ="$DECODER_OBJ layer2.\$(OBJEXT)" + DECODER_LOBJ="$DECODER_LOBJ layer2.lo" + fi +fi + +layer3=enabled +# Check whether --enable-layer3 was given. +if test "${enable_layer3+set}" = set; then : + enableval=$enable_layer3; + if test "x$enableval" = xno; then + layer3="disabled" + fi + +fi + + +if test "x$layer3" = "xdisabled"; then + +$as_echo "#define NO_LAYER3 1" >>confdefs.h + +else + DECODER_OBJ="$DECODER_OBJ layer3.\$(OBJEXT)" + DECODER_LOBJ="$DECODER_LOBJ layer3.lo" +fi + + +# Check whether --with-audio was given. +if test "${with_audio+set}" = set; then : + withval=$with_audio; +fi + + +# Check whether --with-default-audio was given. +if test "${with_default_audio+set}" = set; then : + withval=$with_default_audio; +fi + + + +# Check whether --with-optimization was given. +if test "${with_optimization+set}" = set; then : + withval=$with_optimization; +fi + + + +# Check whether --with-seektable was given. +if test "${with_seektable+set}" = set; then : + withval=$with_seektable; +fi + + + + +# Dummy audio output module is always supported +output_modules="dummy" + +# Decide on module file suffix. Setting it != .la allows removal of .la files. + +# Check whether --with-module-suffix was given. +if test "${with_module_suffix+set}" = set; then : + withval=$with_module_suffix; +fi + +if test x"$with_module_suffix" = x; then + with_module_suffix=.la +fi + +cat >>confdefs.h <<_ACEOF +#define MODULE_FILE_SUFFIX "$with_module_suffix" +_ACEOF + + + +# based on posting from John Dalgliesh on ffmpeg (LGPL) mailing list +# find if .align arg is power-of-two or not +asmalign_exp="unknown" +if test x"$asmalign_exp" = xunknown; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if .align takes 2-exponent" >&5 +$as_echo_n "checking if .align takes 2-exponent... " >&6; } + asmalign_exp="no" + echo '.align 3' > conftest.s + if $CCAS -c -o conftest.o conftest.s 1>/dev/null 2>&1; then + asmalign_exp="yes" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + rm -f conftest.o conftest.s +fi +if test x"$asmalign_exp" = xyes; then + +$as_echo "#define ASMALIGN_EXP 1" >>confdefs.h + +fi + +ccalign="unknown" +if test x"$ccalign" = xunknown; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking __attribute__((aligned(16)))" >&5 +$as_echo_n "checking __attribute__((aligned(16)))... " >&6; } + ccalign="no" + echo '__attribute__((aligned(16))) float var;' > conftest.c + if $CC -c -o conftest.o conftest.c >/dev/null 2>&1; then + ccalign="yes" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + rm -f conftest.o conftest.c +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +for ac_header in stdio.h stdlib.h string.h unistd.h sched.h sys/ioctl.h sys/types.h stdint.h limits.h inttypes.h sys/time.h sys/wait.h sys/resource.h sys/signal.h signal.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then : + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 +$as_echo_n "checking for special C compiler options needed for large files... " >&6; } +if ${ac_cv_sys_largefile_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF + if ac_fn_c_try_compile "$LINENO"; then : + break +fi +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_largefile_CC=' -n32'; break +fi +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 +$as_echo "$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if ${ac_cv_sys_file_offset_bits+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=64; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF +;; +esac +rm -rf conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +if ${ac_cv_sys_large_files+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=1; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 +$as_echo "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF +;; +esac +rm -rf conftest* + fi + + +fi + +if test "x$ac_cv_sys_file_offset_bits" = x || echo "$ac_cv_sys_file_offset_bits" | $GREP '[^0-9]' > /dev/null; then + LFS_LOBJ= +else + # Add dual-mode wrapper code. + LFS_LOBJ=lfs_wrap.lo +fi + +# Using the lower level macros instead of AC_TYPE_* for compatibility with not freshest autoconf. +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned long +_ACEOF + +fi + +ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default" +if test "x$ac_cv_type_uintptr_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define uintptr_t unsigned long +_ACEOF + +fi + +ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" +if test "x$ac_cv_type_ssize_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define ssize_t long +_ACEOF + +fi + +ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" +if test "x$ac_cv_type_off_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define off_t long int +_ACEOF + +fi + +ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default" +if test "x$ac_cv_type_int32_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define int32_t int +_ACEOF + +fi + +ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default" +if test "x$ac_cv_type_uint32_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define uint32_t unsigned int +_ACEOF + +fi + +ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default" +if test "x$ac_cv_type_int16_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define int16_t short +_ACEOF + +fi + +ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default" +if test "x$ac_cv_type_uint16_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define uint16_t unsigned short +_ACEOF + +fi + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 +$as_echo_n "checking size of size_t... " >&6; } +if ${ac_cv_sizeof_size_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_size_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (size_t) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_size_t=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 +$as_echo "$ac_cv_sizeof_size_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of ssize_t" >&5 +$as_echo_n "checking size of ssize_t... " >&6; } +if ${ac_cv_sizeof_ssize_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (ssize_t))" "ac_cv_sizeof_ssize_t" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_ssize_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (ssize_t) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_ssize_t=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_ssize_t" >&5 +$as_echo "$ac_cv_sizeof_ssize_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SSIZE_T $ac_cv_sizeof_ssize_t +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 +$as_echo_n "checking size of off_t... " >&6; } +if ${ac_cv_sizeof_off_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_off_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (off_t) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_off_t=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 +$as_echo "$ac_cv_sizeof_off_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_OFF_T $ac_cv_sizeof_off_t +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int32_t" >&5 +$as_echo_n "checking size of int32_t... " >&6; } +if ${ac_cv_sizeof_int32_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int32_t))" "ac_cv_sizeof_int32_t" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_int32_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (int32_t) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_int32_t=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int32_t" >&5 +$as_echo "$ac_cv_sizeof_int32_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT32_T $ac_cv_sizeof_int32_t +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 +$as_echo_n "checking size of long... " >&6; } +if ${ac_cv_sizeof_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (long) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_long=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 +$as_echo "$ac_cv_sizeof_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long +_ACEOF + + + +# The alias functions want to know the native off_t bits. +# "Native" also means large file offsets, if enabled, it's what is native to the mpg123 library. +if test "x$ac_cv_sizeof_long" = "x"; then + as_fn_error $? "Cannot determine sizeof(long)?" "$LINENO" 5 +else + LFS_ALIAS_BITS=`expr "$ac_cv_sizeof_long" "*" "8"` + +cat >>confdefs.h <<_ACEOF +#define LFS_ALIAS_BITS $LFS_ALIAS_BITS +_ACEOF + +fi + +lfs_alias=enabled +# Check whether --enable-lfs-alias was given. +if test "${enable_lfs_alias+set}" = set; then : + enableval=$enable_lfs_alias; + if test "x$enableval" = xno; then + lfs_alias="disabled" + fi + +else + + case $host in + *-cygwin*) + lfs_alias="disabled" + { $as_echo "$as_me:${as_lineno-$LINENO}: lfs-alias disabled for Cygwin, use --enable-lfs-alias explicitly to enable, only if you know what you are doing" >&5 +$as_echo "$as_me: lfs-alias disabled for Cygwin, use --enable-lfs-alias explicitly to enable, only if you know what you are doing" >&6;} + ;; + esac + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to enable alias wrappers for largefile" >&5 +$as_echo_n "checking if we want to enable alias wrappers for largefile... " >&6; } +if test "x$lfs_alias" = "xenabled"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + LFS_LOBJ="$LFS_LOBJ lfs_alias.lo" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + + + + + + for ac_header in $ac_header_list +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + + + +for ac_func in getpagesize +do : + ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" +if test "x$ac_cv_func_getpagesize" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETPAGESIZE 1 +_ACEOF + +fi +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 +$as_echo_n "checking for working mmap... " >&6; } +if ${ac_cv_func_mmap_fixed_mapped+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_mmap_fixed_mapped=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +/* malloc might have been renamed as rpl_malloc. */ +#undef malloc + +/* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the file system buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propagated back to all the places they're supposed to be. + + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ + +#include +#include + +#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H +char *malloc (); +#endif + +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +int +main () +{ + char *data, *data2, *data3; + const char *cdata2; + int i, pagesize; + int fd, fd2; + + pagesize = getpagesize (); + + /* First, make a file with some known garbage in it. */ + data = (char *) malloc (pagesize); + if (!data) + return 1; + for (i = 0; i < pagesize; ++i) + *(data + i) = rand (); + umask (0); + fd = creat ("conftest.mmap", 0600); + if (fd < 0) + return 2; + if (write (fd, data, pagesize) != pagesize) + return 3; + close (fd); + + /* Next, check that the tail of a page is zero-filled. File must have + non-zero length, otherwise we risk SIGBUS for entire page. */ + fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); + if (fd2 < 0) + return 4; + cdata2 = ""; + if (write (fd2, cdata2, 1) != 1) + return 5; + data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); + if (data2 == MAP_FAILED) + return 6; + for (i = 0; i < pagesize; ++i) + if (*(data2 + i)) + return 7; + close (fd2); + if (munmap (data2, pagesize)) + return 8; + + /* Next, try to mmap the file at a fixed address which already has + something else allocated at it. If we can, also make sure that + we see the same garbage. */ + fd = open ("conftest.mmap", O_RDWR); + if (fd < 0) + return 9; + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + return 10; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + return 11; + + /* Finally, make sure that changes to the mapped area do not + percolate back to the file as seen by read(). (This is a bug on + some variants of i386 svr4.0.) */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = (char *) malloc (pagesize); + if (!data3) + return 12; + if (read (fd, data3, pagesize) != pagesize) + return 13; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + return 14; + close (fd); + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_mmap_fixed_mapped=yes +else + ac_cv_func_mmap_fixed_mapped=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 +$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } +if test $ac_cv_func_mmap_fixed_mapped = yes; then + +$as_echo "#define HAVE_MMAP 1" >>confdefs.h + +fi +rm -f conftest.mmap conftest.txt + + +# Check if system supports termios +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX termios" >&5 +$as_echo_n "checking POSIX termios... " >&6; } +if ${ac_cv_sys_posix_termios+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include + +int +main () +{ +/* SunOS 4.0.3 has termios.h but not the library calls. */ + tcgetattr(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_sys_posix_termios=yes +else + ac_cv_sys_posix_termios=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_posix_termios" >&5 +$as_echo "$ac_cv_sys_posix_termios" >&6; } + +if test "x$ac_cv_sys_posix_termios" = "xyes"; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_TERMIOS 1 +_ACEOF + +fi + +for ac_func in random +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +# Check for sched_setscheduler +for ac_func in sched_setscheduler setuid getuid +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +# Check for setpriority +for ac_func in setpriority +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +for ac_func in strerror +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +for ac_func in setlocale nl_langinfo +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +for ac_func in strdup +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +for ac_func in atoll +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +for ac_func in mkfifo +do : + ac_fn_c_check_func "$LINENO" "mkfifo" "ac_cv_func_mkfifo" +if test "x$ac_cv_func_mkfifo" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MKFIFO 1 +_ACEOF + have_mkfifo=yes +else + have_mkfifo=no +fi +done + + + +# locale headers +for ac_header in locale.h langinfo.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +# Headers for network (http) stuff +network_type=Unknown +for ac_header in netdb.h sys/param.h sys/socket.h netinet/in.h arpa/inet.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +if test "x$ac_cv_header_netdb_h" = "xyes" && + test "x$ac_cv_header_sys_param_h" = "xyes" && + test "x$ac_cv_header_sys_socket_h" = "xyes" && + test "x$ac_cv_header_netinet_in_h" = "xyes" && + test "x$ac_cv_header_arpa_inet_h" = "xyes"; then + have_network=yes + network_type=Posix +else + have_network=no +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 +$as_echo_n "checking for library containing gethostbyname... " >&6; } +if ${ac_cv_search_gethostbyname+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +for ac_lib in '' nsl socket; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_gethostbyname=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_gethostbyname+:} false; then : + break +fi +done +if ${ac_cv_search_gethostbyname+:} false; then : + +else + ac_cv_search_gethostbyname=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 +$as_echo "$ac_cv_search_gethostbyname" >&6; } +ac_res=$ac_cv_search_gethostbyname +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 +$as_echo_n "checking for library containing socket... " >&6; } +if ${ac_cv_search_socket+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char socket (); +int +main () +{ +return socket (); + ; + return 0; +} +_ACEOF +for ac_lib in '' socket; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_socket=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_socket+:} false; then : + break +fi +done +if ${ac_cv_search_socket+:} false; then : + +else + ac_cv_search_socket=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 +$as_echo "$ac_cv_search_socket" >&6; } +ac_res=$ac_cv_search_socket +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + +for ac_func in getaddrinfo +do : + ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" +if test "x$ac_cv_func_getaddrinfo" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETADDRINFO 1 +_ACEOF + have_ipv6=yes +else + have_ipv6=no +fi +done + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working AI_ADDRCONFIG" >&5 +$as_echo_n "checking for working AI_ADDRCONFIG... " >&6; } +if ${apr_cv_gai_addrconfig+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test "$cross_compiling" = yes; then : + apr_cv_gai_addrconfig=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_NETDB_H +#include +#endif +#ifdef HAVE_STRING_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + +int main(int argc, char **argv) { + struct addrinfo hints, *ai; + + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + hints.ai_flags = AI_ADDRCONFIG; + return getaddrinfo("localhost", NULL, &hints, &ai) != 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + apr_cv_gai_addrconfig=yes +else + apr_cv_gai_addrconfig=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_cv_gai_addrconfig" >&5 +$as_echo "$apr_cv_gai_addrconfig" >&6; } + +if test $apr_cv_gai_addrconfig = yes; then + +$as_echo "#define HAVE_GAI_ADDRCONFIG 1" >>confdefs.h + +fi + + +# Substitutions for the installable mpg123.h header +if test "x$ac_cv_header_stdio_h" = "xyes"; then + INCLUDE_STDIO_H="#include " +else + INCLUDE_STDIO_H="/* #include is not available on this system */" +fi + + +if test "x$ac_cv_header_stdlib_h" = "xyes"; then + INCLUDE_STDLIB_H="#include " +else + INCLUDE_STDLIB_H="/* #include is not available on this system */" +fi + + +if test "x$ac_cv_header_sys_types_h" = "xyes"; then + INCLUDE_SYS_TYPE_H="#include " +else + INCLUDE_SYS_TYPE_H="/* #include is not available on this system */" +fi + + + +# Checks for maths libraries. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 +$as_echo_n "checking for sqrt in -lm... " >&6; } +if ${ac_cv_lib_m_sqrt+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char sqrt (); +int +main () +{ +return sqrt (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_sqrt=yes +else + ac_cv_lib_m_sqrt=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 +$as_echo "$ac_cv_lib_m_sqrt" >&6; } +if test "x$ac_cv_lib_m_sqrt" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBM 1 +_ACEOF + + LIBS="-lm $LIBS" + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for powf in -lmx" >&5 +$as_echo_n "checking for powf in -lmx... " >&6; } +if ${ac_cv_lib_mx_powf+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmx $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char powf (); +int +main () +{ +return powf (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_mx_powf=yes +else + ac_cv_lib_mx_powf=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mx_powf" >&5 +$as_echo "$ac_cv_lib_mx_powf" >&6; } +if test "x$ac_cv_lib_mx_powf" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBMX 1 +_ACEOF + + LIBS="-lmx $LIBS" + +fi + + +# attempt to make the signal stuff work... also with GENERIC - later +#if test x"$ac_cv_header_sys_signal_h" = xyes; then +# AC_CHECK_FUNCS( sigemptyset sigaddset sigprocmask sigaction ) +# if test x"$ac_cv_func_sigemptyset" = xyes && +# test x"$ac_cv_func_sigaddset" = xyes && +# test x"$ac_cv_func_sigprocmask" = xyes && +# test x"$ac_cv_func_sigaction" = xyes; then +# AC_DEFINE( +#fi + + +# do not assume gcc here, so no flags by default +ADD_CFLAGS="" +ADD_CPPFLAGS="" +ADD_LDFLAGS="" +LIBS="$LIBS" + +ac_fn_c_check_header_mongrel "$LINENO" "os2.h" "ac_cv_header_os2_h" "$ac_includes_default" +if test "x$ac_cv_header_os2_h" = xyes; then : + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOS2" +fi + + + +# If debugging is enabled then make warnings errors +if test x"$debugging" = xenabled; then + ADD_CFLAGS="-g" + # gcc specific... + if test x"$GCC" = xyes; then + ADD_CFLAGS="$ADD_CFLAGS -Wall -fno-strict-aliasing" + if test x"$nagging" = xenabled; then + ADD_CFLAGS="$ADD_CFLAGS -Werror -pedantic -DPLAIN_C89" + fi + fi +fi + +case $host in + i?86-*) + +$as_echo "#define ABI_ALIGN_FUN 1" >>confdefs.h + + ;; +esac + +s_altivec="synth_altivec dct64_altivec" +s_i386="dct64_i386" +s_i486="$s_i386 synth_i486 dct64_i486" +s_i586="$s_i386 synth_i586" +s_i586d="$s_i386 synth_i586_dither" +s_3dnow="$s_i386 synth_3dnow dct64_3dnow equalizer_3dnow" +s_3dnowext="$s_i386 dct64_3dnowext tabinit_mmx synth_3dnowext" +if test "x$layer3" = "xenabled"; then + s_3dnow="$s_3dnow dct36_3dnow" + s_3dnowext="$s_3dnowext dct36_3dnowext" +fi +s_mmx="$s_i386 dct64_mmx tabinit_mmx synth_mmx" +s_sse="$s_i386 tabinit_mmx dct64_sse dct64_sse_float synth_sse_float synth_stereo_sse_float synth_sse_s32 synth_stereo_sse_s32 " +s_x86_64="dct64_x86_64 dct64_x86_64_float synth_x86_64_float synth_x86_64_s32 synth_stereo_x86_64_float synth_stereo_x86_64_s32" +s_x86multi="getcpuflags" +s_dither="dither" +s_neon="dct64_neon dct64_neon_float synth_neon_float synth_neon_s32 synth_stereo_neon_float synth_stereo_neon_s32" + +# choose optimized 16bit decoder for SSE, quality or fast +# note: supporting deactivation of output formats for these decoders would need more logic here +if test "x$integers" = "xquality"; then + s_sse="$s_sse synth_sse_accurate synth_stereo_sse_accurate" + s_x86_64="$s_x86_64 synth_x86_64_accurate synth_stereo_x86_64_accurate" + s_arm="synth_arm_accurate" + s_neon="$s_neon synth_neon_accurate synth_stereo_neon_accurate" +else + s_sse="$s_sse synth_sse" # no stereo + s_x86_64="$s_x86_64 synth_x86_64 synth_stereo_x86_64" + s_arm="synth_arm" + s_neon="$s_neon synth_neon synth_stereo_neon" +fi + +case $cpu_type in + generic) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_GENERIC -DREAL_IS_FLOAT" + more_sources="$s_fpu" + ccalign=no + ;; + generic_dither) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_GENERIC_DITHER -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_dither" + ccalign=no + ;; + generic_fpu | generic_float) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_GENERIC -DREAL_IS_FLOAT" + more_sources="$s_fpu" + ccalign=no + ;; + generic_nofpu) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_GENERIC -DREAL_IS_FIXED" + more_sources= + ccalign=no + ;; + ppc_nofpu) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_PPC -DREAL_IS_FIXED" + more_sources= + ccalign=no + ;; + arm_nofpu) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_ARM -DREAL_IS_FIXED" + more_sources="$s_arm" + ccalign=no + ;; + altivec) + ADD_CFLAGS="$ADD_CFLAGS -maltivec" + ADD_CPPFLAGS="$ADD_CPPFLAGS -DREAL_IS_FLOAT -DOPT_ALTIVEC" + more_sources="$s_altivec $s_fpu" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -faltivec" >&5 +$as_echo_n "checking if $CC accepts -faltivec... " >&6; } + touch conftest.c + if $CC -faltivec -c -o conftest.o conftest.c >/dev/null 2>&1; then + ADD_CFLAGS="$ADD_CFLAGS -faltivec" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + rm -f conftest.o conftest.c + ;; + neon) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_NEON -DREAL_IS_FLOAT" + more_sources="$s_neon $s_fpu" + ;; + i386) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_I386 -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_i386" + ccalign=no + ;; + i386_fpu) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_I386 -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_i386" + ccalign=no + ;; + i386_nofpu) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_I386 -DREAL_IS_FIXED" + more_sources="$s_i386" + ccalign=no + ;; + i486) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_I486 -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_i486" + ccalign=no + ;; + i586) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_I586 -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_i586" + ;; + i586_dither) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_I586_DITHER -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_i586d $s_dither" + ;; + 3dnow) + # legacy 3dnow had the 3dnow paired with i586... + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_MULTI -DOPT_I586 -DOPT_3DNOW -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_i586 $s_3dnow $s_x86multi " + ;; + 3dnow_alone) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_3DNOW -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_3dnow" + ;; + 3dnowext_alone) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_3DNOWEXT -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_3dnowext" + ;; + 3dnowext) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_MULTI -DOPT_3DNOW -DOPT_3DNOWEXT -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_3dnowext $s_3dnow $s_x86multi" + ;; + mmx_alone|mmx) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_MMX -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_mmx" + ;; + sse_alone|sse) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_SSE -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_sse" + ;; + x86|x86_dither) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_MULTI -DOPT_GENERIC -DOPT_GENERIC_DITHER -DOPT_I386 -DOPT_I586 -DOPT_I586_DITHER -DOPT_MMX -DOPT_3DNOW -DOPT_3DNOWEXT -DOPT_SSE -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_i386 $s_i586 $s_i586d $s_mmx $s_3dnow $s_3dnowext $s_sse $s_x86multi $s_dither" + ;; + x86-64) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_X86_64 -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_x86_64" + ;; + x86-64_all|x86-64_dither) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_MULTI -DOPT_X86_64 -DOPT_GENERIC -DOPT_GENERIC_DITHER -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_x86_64 $s_dither" + ;; + *) + as_fn_error $? "Unknown CPU type '$cpu_type'" "$LINENO" 5 + ;; +esac + +# Mac OS X specific linker flags +case $cpu_type in + 3dnow|3dnow_alone|3dnowext|3dnowext_alone|mmx|mmx_alone|sse|sse_alone|x86|x86_dither) + case $host in + i386-apple-darwin8*|*-apple-darwin10*) + ADD_LDFLAGS="$ADD_LDFLAGS -Wl,-read_only_relocs,suppress" + ;; + i386-apple-darwin9*) + ADD_CFLAGS="$ADD_CFLAGS -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" + ADD_LDFLAGS="$ADD_LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -Wl,-classic_linker -Wl,-read_only_relocs,suppress" + ;; + esac + ;; +esac + +# Check if we want feature report function. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want feature report function" >&5 +$as_echo_n "checking if we want feature report function... " >&6; } +feature_report=enabled +# Check whether --enable-feature_report was given. +if test "${enable_feature_report+set}" = set; then : + enableval=$enable_feature_report; + if test "x$enableval" = xno; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + feature_report=disabled + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi + + +if test "x$feature_report" = xenabled; then + more_sources="$more_sources feature" +fi + +for i in $more_sources +do + # Echo make sure every file is only once in the list. + echo "$DECODER_OBJ" | $GREP -v -w "$i\.\$(OBJEXT)" > /dev/null && DECODER_OBJ="$DECODER_OBJ $i.\$(OBJEXT)" + echo "$DECODER_LOBJ" | $GREP -v -w "$i\.lo" > /dev/null && DECODER_LOBJ="$DECODER_LOBJ $i.lo" +done + + + + +if test x"$ccalign" = xyes; then + +$as_echo "#define CCALIGN 1" >>confdefs.h + +fi + + + +# The full list of supported modules to check, first come, first serve. +check_modules="alsa oss coreaudio sndio sun win32 os2 esd jack portaudio pulse sdl nas arts openal dummy" +# The final list. +output_modules= + +check_forced=no +check_failed=no +if test "x$with_audio" != "x"; then + check_modules="`echo $with_audio|tr , ' '` dummy" + echo "Limiting outputs to build according to your preference: $check_modules" + check_forced=yes +fi + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi + +fi + +# Now go through the modules to check and do the chores. +for m in $check_modules +do + case "$m" in + dummy) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if you are too dumbing dumb for the dummy" >&5 +$as_echo_n "checking if you are too dumbing dumb for the dummy... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + output_modules="$output_modules dummy" + HAVE_DUMMY=yes + ;; + oss) + for ac_header in sys/soundcard.h linux/soundcard.h machine/soundcard.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + if test "x${ac_cv_header_sys_soundcard_h}" = "xyes" \ + -o "x${ac_cv_header_linux_soundcard_h}" = "xyes" \ + -o "x${ac_cv_header_machine_soundcard_h}" = "xyes"; + then + output_modules="$output_modules oss" + HAVE_OSS="yes" + else + check_failed=yes + fi + ;; + alsa) + ALSA_LIBS="-lasound" + # Check for ALSA + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for snd_pcm_open in -lasound" >&5 +$as_echo_n "checking for snd_pcm_open in -lasound... " >&6; } +if ${ac_cv_lib_asound_snd_pcm_open+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lasound $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char snd_pcm_open (); +int +main () +{ +return snd_pcm_open (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_asound_snd_pcm_open=yes +else + ac_cv_lib_asound_snd_pcm_open=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_asound_snd_pcm_open" >&5 +$as_echo "$ac_cv_lib_asound_snd_pcm_open" >&6; } +if test "x$ac_cv_lib_asound_snd_pcm_open" = xyes; then : + ac_fn_c_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default" +if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then : + output_modules="$output_modules alsa" HAVE_ALSA="yes" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found ALSA library but NOT header files on your system" >&5 +$as_echo "$as_me: WARNING: Found ALSA library but NOT header files on your system" >&2;} +fi + + + + +fi + + if test "x$HAVE_ALSA" != xyes; then + check_failed=yes + fi + ;; + jack) + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for JACK" >&5 +$as_echo_n "checking for JACK... " >&6; } + +if test -n "$JACK_CFLAGS"; then + pkg_cv_JACK_CFLAGS="$JACK_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"jack\""; } >&5 + ($PKG_CONFIG --exists --print-errors "jack") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_JACK_CFLAGS=`$PKG_CONFIG --cflags "jack" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$JACK_LIBS"; then + pkg_cv_JACK_LIBS="$JACK_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"jack\""; } >&5 + ($PKG_CONFIG --exists --print-errors "jack") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_JACK_LIBS=`$PKG_CONFIG --libs "jack" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + JACK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "jack" 2>&1` + else + JACK_PKG_ERRORS=`$PKG_CONFIG --print-errors "jack" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$JACK_PKG_ERRORS" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + HAVE_JACK="no" check_failed=yes +elif test $pkg_failed = untried; then + HAVE_JACK="no" check_failed=yes +else + JACK_CFLAGS=$pkg_cv_JACK_CFLAGS + JACK_LIBS=$pkg_cv_JACK_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + output_modules="$output_modules jack" HAVE_JACK="yes" +fi + ;; + pulse) + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PULSE" >&5 +$as_echo_n "checking for PULSE... " >&6; } + +if test -n "$PULSE_CFLAGS"; then + pkg_cv_PULSE_CFLAGS="$PULSE_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpulse-simple\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libpulse-simple") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_PULSE_CFLAGS=`$PKG_CONFIG --cflags "libpulse-simple" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$PULSE_LIBS"; then + pkg_cv_PULSE_LIBS="$PULSE_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpulse-simple\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libpulse-simple") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_PULSE_LIBS=`$PKG_CONFIG --libs "libpulse-simple" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + PULSE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpulse-simple" 2>&1` + else + PULSE_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpulse-simple" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$PULSE_PKG_ERRORS" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + HAVE_PULSE="no" check_failed=yes +elif test $pkg_failed = untried; then + HAVE_PULSE="no" check_failed=yes +else + PULSE_CFLAGS=$pkg_cv_PULSE_CFLAGS + PULSE_LIBS=$pkg_cv_PULSE_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + output_modules="$output_modules pulse" HAVE_PULSE="yes" +fi + ;; + esd) + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ESD" >&5 +$as_echo_n "checking for ESD... " >&6; } + +if test -n "$ESD_CFLAGS"; then + pkg_cv_ESD_CFLAGS="$ESD_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"esound\""; } >&5 + ($PKG_CONFIG --exists --print-errors "esound") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_ESD_CFLAGS=`$PKG_CONFIG --cflags "esound" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$ESD_LIBS"; then + pkg_cv_ESD_LIBS="$ESD_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"esound\""; } >&5 + ($PKG_CONFIG --exists --print-errors "esound") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_ESD_LIBS=`$PKG_CONFIG --libs "esound" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + ESD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "esound" 2>&1` + else + ESD_PKG_ERRORS=`$PKG_CONFIG --print-errors "esound" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$ESD_PKG_ERRORS" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + HAVE_ESD="no" check_failed=yes +elif test $pkg_failed = untried; then + HAVE_ESD="no" check_failed=yes +else + ESD_CFLAGS=$pkg_cv_ESD_CFLAGS + ESD_LIBS=$pkg_cv_ESD_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + output_modules="$output_modules esd" HAVE_ESD="yes" +fi + ;; + portaudio) + # Remember: This looks only insane because you chose an insane tab width! + PORTAUDIO_LIBS="-lportaudio" + PORTAUDIO_CFLAGS= + case $host in + *-*-mingw32) + # We tested portaudio with MME + if test "x$HAVE_PORTAUDIO" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Pa_Initialize in -lportaudio" >&5 +$as_echo_n "checking for Pa_Initialize in -lportaudio... " >&6; } +if ${ac_cv_lib_portaudio_Pa_Initialize+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lportaudio -lwinmm + $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char Pa_Initialize (); +int +main () +{ +return Pa_Initialize (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_portaudio_Pa_Initialize=yes +else + ac_cv_lib_portaudio_Pa_Initialize=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_portaudio_Pa_Initialize" >&5 +$as_echo "$ac_cv_lib_portaudio_Pa_Initialize" >&6; } +if test "x$ac_cv_lib_portaudio_Pa_Initialize" = xyes; then : + ac_fn_c_check_header_mongrel "$LINENO" "portaudio.h" "ac_cv_header_portaudio_h" "$ac_includes_default" +if test "x$ac_cv_header_portaudio_h" = xyes; then : + output_modules="$output_modules portaudio" HAVE_PORTAUDIO_WINMM="yes" HAVE_PORTAUDIO="yes" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found PortAudio library but NOT header files on your system" >&5 +$as_echo "$as_me: WARNING: Found PortAudio library but NOT header files on your system" >&2;} +fi + + + PORTAUDIO_LIBS="$PORTAUDIO_LIBS -lwinmm" + +else + HAVE_PORTAUDIO="no" +fi + + fi + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Pa_Initialize in -lportaudio" >&5 +$as_echo_n "checking for Pa_Initialize in -lportaudio... " >&6; } +if ${ac_cv_lib_portaudio_Pa_Initialize+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lportaudio $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char Pa_Initialize (); +int +main () +{ +return Pa_Initialize (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_portaudio_Pa_Initialize=yes +else + ac_cv_lib_portaudio_Pa_Initialize=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_portaudio_Pa_Initialize" >&5 +$as_echo "$ac_cv_lib_portaudio_Pa_Initialize" >&6; } +if test "x$ac_cv_lib_portaudio_Pa_Initialize" = xyes; then : + ac_fn_c_check_header_mongrel "$LINENO" "portaudio.h" "ac_cv_header_portaudio_h" "$ac_includes_default" +if test "x$ac_cv_header_portaudio_h" = xyes; then : + output_modules="$output_modules portaudio" HAVE_PORTAUDIO="yes" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found PortAudio library but NOT header files on your system" >&5 +$as_echo "$as_me: WARNING: Found PortAudio library but NOT header files on your system" >&2;} +fi + + + + +fi + + ;; + esac + if test "x$HAVE_PORTAUDIO" != xyes; then + check_failed=yes + else + # See if we have v19 or v18 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Pa_GetVersion in -lportaudio" >&5 +$as_echo_n "checking for Pa_GetVersion in -lportaudio... " >&6; } +if ${ac_cv_lib_portaudio_Pa_GetVersion+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lportaudio $PORTAUDIO_LIBS $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char Pa_GetVersion (); +int +main () +{ +return Pa_GetVersion (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_portaudio_Pa_GetVersion=yes +else + ac_cv_lib_portaudio_Pa_GetVersion=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_portaudio_Pa_GetVersion" >&5 +$as_echo "$ac_cv_lib_portaudio_Pa_GetVersion" >&6; } +if test "x$ac_cv_lib_portaudio_Pa_GetVersion" = xyes; then : + : +else + +$as_echo "#define PORTAUDIO18 1" >>confdefs.h + +fi + + fi + ;; + sdl) + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDL" >&5 +$as_echo_n "checking for SDL... " >&6; } + +if test -n "$SDL_CFLAGS"; then + pkg_cv_SDL_CFLAGS="$SDL_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl\""; } >&5 + ($PKG_CONFIG --exists --print-errors "sdl") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SDL_CFLAGS=`$PKG_CONFIG --cflags "sdl" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$SDL_LIBS"; then + pkg_cv_SDL_LIBS="$SDL_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl\""; } >&5 + ($PKG_CONFIG --exists --print-errors "sdl") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SDL_LIBS=`$PKG_CONFIG --libs "sdl" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "sdl" 2>&1` + else + SDL_PKG_ERRORS=`$PKG_CONFIG --print-errors "sdl" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$SDL_PKG_ERRORS" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + HAVE_SDL="no" check_failed=yes +elif test $pkg_failed = untried; then + HAVE_SDL="no" check_failed=yes +else + SDL_CFLAGS=$pkg_cv_SDL_CFLAGS + SDL_LIBS=$pkg_cv_SDL_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + output_modules="$output_modules sdl" HAVE_SDL="yes" +fi + ;; + nas) + NAS_LIBS=-laudio + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AuOpenServer in -laudio" >&5 +$as_echo_n "checking for AuOpenServer in -laudio... " >&6; } +if ${ac_cv_lib_audio_AuOpenServer+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-laudio $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char AuOpenServer (); +int +main () +{ +return AuOpenServer (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_audio_AuOpenServer=yes +else + ac_cv_lib_audio_AuOpenServer=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_audio_AuOpenServer" >&5 +$as_echo "$ac_cv_lib_audio_AuOpenServer" >&6; } +if test "x$ac_cv_lib_audio_AuOpenServer" = xyes; then : + ac_fn_c_check_header_mongrel "$LINENO" "audio/audiolib.h" "ac_cv_header_audio_audiolib_h" "$ac_includes_default" +if test "x$ac_cv_header_audio_audiolib_h" = xyes; then : + output_modules="$output_modules nas" HAVE_NAS="yes" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found NAS library but NOT header files on your system" >&5 +$as_echo "$as_me: WARNING: Found NAS library but NOT header files on your system" >&2;} +fi + + + + +fi + + if test "x$HAVE_NAS" != xyes; then + check_failed=yes + fi + ;; + win32) + # Check for windows ... and win32 audio + # Does not work... instead just check for header + # AC_CHECK_LIB( [winmm], [waveOutOpen] ) + WIN32_LIBS=-lwinmm + for ac_header in windows.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" +if test "x$ac_cv_header_windows_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WINDOWS_H 1 +_ACEOF + output_modules="$output_modules win32" HAVE_WIN32=yes +else + HAVE_WIN32=no check_failed=yes +fi + +done + + ;; + sndio) + SNDIO_LIBS=-lsndio + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sio_open in -lsndio" >&5 +$as_echo_n "checking for sio_open in -lsndio... " >&6; } +if ${ac_cv_lib_sndio_sio_open+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsndio $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char sio_open (); +int +main () +{ +return sio_open (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_sndio_sio_open=yes +else + ac_cv_lib_sndio_sio_open=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sndio_sio_open" >&5 +$as_echo "$ac_cv_lib_sndio_sio_open" >&6; } +if test "x$ac_cv_lib_sndio_sio_open" = xyes; then : + for ac_header in sndio.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sndio.h" "ac_cv_header_sndio_h" "$ac_includes_default" +if test "x$ac_cv_header_sndio_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SNDIO_H 1 +_ACEOF + output_modules="$output_modules sndio" HAVE_SNDIO="yes" +fi + +done + + + +fi + + if test "x$HAVE_SNDIO" != xyes; then + check_failed=yes + fi + ;; + sun) + for ac_header in sun/audioio.h sys/audioio.h asm/audioio.h sys/audio.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + if test "x${ac_cv_header_sun_audioio_h}" = "xyes" \ + -o "x${ac_cv_header_sys_audioio_h}" = "xyes" \ + -o "x${ac_cv_header_asm_audioio_h}" = "xyes"; + then + output_modules="$output_modules sun" + HAVE_SUN="yes" + else + check_failed=yes + fi + ;; + coreaudio) + COREAUDIO_LIBS="-framework AudioToolbox -framework AudioUnit -framework CoreServices" + for ac_header in AudioUnit/AudioUnit.h CoreServices/CoreServices.h AudioToolbox/AudioToolbox.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + if test "x${ac_cv_header_AudioUnit_AudioUnit_h}" = "xyes" \ + -a "x${ac_cv_header_CoreServices_CoreServices_h}" = "xyes" \ + -a "x${ac_cv_header_AudioToolbox_AudioToolbox_h}" = "xyes"; + then + if test x"$modules" = xdisabled; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling buffer because of directly linked CoreAudio! Use the module if you need the buffer." >&5 +$as_echo "$as_me: WARNING: Disabling buffer because of directly linked CoreAudio! Use the module if you need the buffer." >&2;} + buffer=disabled + fi + output_modules="$output_modules coreaudio" + HAVE_COREAUDIO="yes" + else + check_failed=yes + fi + ;; + arts) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for artsc" >&5 +$as_echo_n "checking for artsc... " >&6; } + if artsc-config; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + output_modules="$output_modules arts" + HAVE_ARTS=yes + ARTS_LIBS=`artsc-config --libs` + ARTS_CFLAGS=`artsc-config --cflags` + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + check_failed=yes + fi + ;; + openal) + for ac_header in OpenAL/al.h OpenAL/alc.h AL/al.h AL/alc.h al.h alc.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + if test "x${ac_cv_header_OpenAL_al_h}" = "xyes" \ + -a "x${ac_cv_header_OpenAL_alc_h}" = "xyes"; + then #Mac OS X + output_modules="$output_modules openal" + OPENAL_LIBS="-framework OpenAL" + OPENAL_CFLAGS="-DOPENAL_SUBDIR_OPENAL" + HAVE_OPENAL="yes" + elif test "x${ac_cv_header_AL_al_h}" = "xyes" \ + -a "x${ac_cv_header_AL_alc_h}" = "xyes"; + then #Linux + output_modules="$output_modules openal" + OPENAL_LIBS="-lopenal" + OPENAL_CFLAGS="-DOPENAL_SUBDIR_AL" + HAVE_OPENAL="yes" + elif test "x${ac_cv_header_al_h}" = "xyes" \ + -a "x${ac_cv_header_alc_h}" = "xyes"; + then #Windows? + output_modules="$output_modules openal" + OPENAL_LIBS="-lopenal" + OPENAL_CFLAGS="" + HAVE_OPENAL="yes" + else + check_failed=yes + fi + ;; + os2) + OS2_LIBS="-los2me -lmmpm2 -lsocket" + for ac_header in os2.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "os2.h" "ac_cv_header_os2_h" "$ac_includes_default" +if test "x$ac_cv_header_os2_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_OS2_H 1 +_ACEOF + +fi + +done + + # os2me.h depends on os2.h + # Yes, that way of coding it is ugly. + if test "x${ac_cv_header_os2_h}" = xyes + then + # We mimick exactly the way how the header will be used. + # It seems to be picky... + for ac_header in os2me.h +do : + ac_fn_c_check_header_compile "$LINENO" "os2me.h" "ac_cv_header_os2me_h" "#define INCL_OS2MM +#define INCL_DOS +#define INCL_VIO +#define INCL_KBD +#include +# +" +if test "x$ac_cv_header_os2me_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_OS2ME_H 1 +_ACEOF + +fi + +done + + fi + if test "x${ac_cv_header_os2_h}" = xyes \ + -a "x${ac_cv_header_os2me_h}" = xyes + then + output_modules="$output_modules os2" + HAVE_OS2=yes + else + check_failed=yes + fi + ;; +# from here on only forced tests, untested code + hp) + # What's the deal with that and alib? + UNSUPPORTED_AUDIO=yes + ac_fn_c_check_header_mongrel "$LINENO" "sys/audio.h" "ac_cv_header_sys_audio_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_audio_h" = xyes; then : + output_modules="$output_modules hp" HAVE_HP=yes +else + check_failed=yes +fi + + + ;; + alib) + UNSUPPORTED_AUDIO=yes + # ALIB_CFLAGS="-I/opt/audio/include" + ALIB_LIBS=-lAlib + # These headers may not be all about audio but they are used. + for ac_header in Alib.h CUlib.h netdb.h netinet/in.h netinet/tcp.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + if test "x${ac_cv_header_Alib_h}" = xyes \ + -a "x${ac_cv_header_CUlib_h}" = xyes \ + -a "x${ac_cv_header_netdb_h}" = xyes \ + -a "x${ac_cv_header_netinet_in_h}" = xyes \ + -a "x${ac_cv_header_netinet_tcp_h}" = xyes + then + output_modules="$output_modules alib" + HAVE_ALIB=yes + else + check_failed=yes + fi + ;; + mint) + UNSUPPORTED_AUDIO=yes + for ac_header in audios.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "audios.h" "ac_cv_header_audios_h" "$ac_includes_default" +if test "x$ac_cv_header_audios_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_AUDIOS_H 1 +_ACEOF + output_modules="$output_modules mint" HAVE_MINT=yes +else + check_failes=yes +fi + +done + + ;; + aix) + UNSUPPORTED_AUDIO=yes + for ac_header in sys/audio.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/audio.h" "ac_cv_header_sys_audio_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_audio_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_AUDIO_H 1 +_ACEOF + output_modules="$output_modules aix" HAVE_AIX=yes +else + check_failed=yes +fi + +done + + ;; + sgi) + UNSUPPORTED_AUDIO=yes + SGI_LIBS=-laudio + ac_fn_c_check_header_mongrel "$LINENO" "dmedia/audio.h" "ac_cv_header_dmedia_audio_h" "$ac_includes_default" +if test "x$ac_cv_header_dmedia_audio_h" = xyes; then : + output_modules="$output_modules sgi" HAVE_SGI=yes +else + check_failed=yes +fi + + + ;; + *) + as_fn_error $? "Unsupported/-known output '$m' demanded!" "$LINENO" 5 + ;; + esac +done + +if test "x$check_forced" = xyes -a "x$UNSUPPORTED_AUDIO" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You requested bulding of an unsupported audio module. Be prepared for happy hacking and please tell us about your experience!" >&5 +$as_echo "$as_me: WARNING: You requested bulding of an unsupported audio module. Be prepared for happy hacking and please tell us about your experience!" >&2;} +fi + +if test "x$check_forced" = xyes -a "x$check_failed" = "xyes"; then + as_fn_error $? "One/some of your requested audio modules failed the test!" "$LINENO" 5 +fi + +# When you extend check_modules, you should extend this: +#for i in alsa oss coreaudio sndio sun win32 esd jack portaudio pulse sdl nas aix alib arts hp os2 sgi mint openal dummy; do echo $i; done | +#perl -ne 'chomp; $big = uc($_); print <>confdefs.h <<_ACEOF +#define DEFAULT_OUTPUT_MODULE "$default_output_modules" +_ACEOF + + + + + + + + + + +CFLAGS="$ADD_CFLAGS $CFLAGS" +if test x"$buffer" = xdisabled; then + ADD_CPPFLAGS="$ADD_CPPFLAGS -DNOXFERMEM" +fi +if test x"$newoldwritesample" = xenabled; then + ADD_CPPFLAGS="$ADD_CPPFLAGS -DNEWOLD_WRITE_SAMPLE" +fi +CPPFLAGS="$ADD_CPPFLAGS $CPPFLAGS" +LDFLAGS="$ADD_LDFLAGS $LDFLAGS" + +# None chosen? +if test "x$with_optimization" = "x"; then + if test x"$debugging" = xenabled; then + with_optimization="0" + else + # enable (gcc specific) default opts only with gcc + if test "x$GCC" = xyes; then + with_optimization="2" + else + with_optimization="0" + fi + fi +fi + +case $with_optimization in + 0) + # No Optimizations + CFLAGS="$CFLAGS" + ;; + 1) + CFLAGS="-O $CFLAGS" + ;; + 2) + CFLAGS="-O2 -fomit-frame-pointer -funroll-all-loops -finline-functions -ffast-math $CFLAGS" + ;; + 3) + CFLAGS="-O3 -fomit-frame-pointer -funroll-all-loops -finline-functions -ffast-math $CFLAGS" + ;; + 4) + CFLAGS="-O4 -fomit-frame-pointer -funroll-all-loops -finline-functions -ffast-math $CFLAGS" + ;; + *) + as_fn_error $? "Unknown optimizations level '$with_optimization'" "$LINENO" 5 + ;; +esac + +if test "x$GCC" = xyes && echo "$CFLAGS" | $GREP 'mpreferred-stack-boundary=' > /dev/null; then + case $cpu_type in + x86 | i586* | mmx | sse | 3dnow* | altivec) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are trying to mess with stack alignment. I know better. " >&5 +$as_echo "$as_me: WARNING: You are trying to mess with stack alignment. I know better. " >&2;} + CFLAGS="$CFLAGS -mpreferred-stack-boundary=4" + ;; + esac +fi + + +if test "x$with_seektable" = "x"; then + seektable=1000 +else + seektable=$with_seektable +fi + +if test "$seektable" -gt 0; then + +$as_echo "#define FRAME_INDEX 1" >>confdefs.h + +fi +# Define that always... also without frame index enabled. + +cat >>confdefs.h <<_ACEOF +#define INDEX_SIZE $seektable +_ACEOF + + +# Check if we want Unicode for Win32. Cygwin does not need _wopen +win32_specific_codes=disabled +win32_unicode=unneeded +win32_sockets=disabled +win32_sockets_working=no +win32_wide_working=no +win32_winver_bump=no +for ac_header in windows.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" +if test "x$ac_cv_header_windows_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WINDOWS_H 1 +_ACEOF + win32_specific_codes=enabled +fi + +done + +if test "x$win32_specific_codes" = xenabled && test "x$host_os" != "xcygwin"; then + +#### Check for Wide functions + ac_fn_c_check_func "$LINENO" "_wopen" "ac_cv_func__wopen" +if test "x$ac_cv_func__wopen" = xyes; then : + win32_unicode=enabled +else + win32_unicode=disabled +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want Unicode File Open for Win32" >&5 +$as_echo_n "checking if we want Unicode File Open for Win32... " >&6; } + if test "x$win32_unicode" = xenabled; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Unicode functions working" >&5 +$as_echo_n "checking if Unicode functions working... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include + int main() + { + MultiByteToWideChar (0, 0, NULL, 0, NULL, 0); + WideCharToMultiByte (0, 0, NULL, 0, NULL, 0, NULL, NULL); + return 0; + } + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + win32_wide_working=yes +else + win32_winver_bump=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "x$win32_wide_working" = xno; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #define WINVER 0x501 + #define _WIN32_WINNT 0x501 + #include + #include + int main() + { + MultiByteToWideChar (0, 0, NULL, 0, NULL, 0); + WideCharToMultiByte (0, 0, NULL, 0, NULL, 0, NULL, NULL); + return 0; + } + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + win32_wide_working=yes +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + if test "x$win32_wide_working" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define WANT_WIN32_UNICODE 1" >>confdefs.h + + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unicode File Open for Win32 disabled" >&5 +$as_echo "$as_me: WARNING: Unicode File Open for Win32 disabled" >&2;} + fi + +#### Check for Network functions + for ac_header in ws2tcpip.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" +if test "x$ac_cv_header_ws2tcpip_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WS2TCPIP_H 1 +_ACEOF + win32_sockets=enabled +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please update your headers to support winsock 2.2." >&5 +$as_echo "$as_me: WARNING: Please update your headers to support winsock 2.2." >&2;} +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want Win32 sockets" >&5 +$as_echo_n "checking if we want Win32 sockets... " >&6; } + if test "x$win32_sockets" = "xenabled" && test "x$network" != "xdisabled"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if winsock2 API is available" >&5 +$as_echo_n "checking if winsock2 API is available... " >&6; } + wsoldlibs="$LIBS" + LIBS="$LIBS -lws2_32" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include + #include + int main() + { + getaddrinfo(NULL, NULL, NULL, NULL); + freeaddrinfo(NULL); + return 0; + } + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + win32_sockets_working=yes +else + win32_winver_bump=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "x$win32_sockets_working" = "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking deeper if winsock2 API is available" >&5 +$as_echo_n "checking deeper if winsock2 API is available... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #define WINVER 0x501 + #define _WIN32_WINNT 0x501 + #include + #include + #include + int main() + { + getaddrinfo(NULL, NULL, NULL, NULL); + freeaddrinfo(NULL); + return 0; + } + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + win32_sockets_working=yes +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + if test "x$win32_sockets_working" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define WANT_WIN32_SOCKETS 1" >>confdefs.h + + network_type=Winsock2 + have_network=yes + have_ipv6=yes + else + LIBS="$wsoldlibs" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please update your headers to support winsock 2.2." >&5 +$as_echo "$as_me: WARNING: Please update your headers to support winsock 2.2." >&2;} + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + +#### Check for Win32 Named Pipe functions +win32_fifo_working=no +if test x$win32_specific_codes = xenabled; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have Named Pipes" >&5 +$as_echo_n "checking if we have Named Pipes... " >&6; } + if test "x$fifo" != "xdisabled"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + int main(){ + CreateNamedPipeA(NULL,PIPE_ACCESS_DUPLEX|FILE_FLAG_OVERLAPPED,PIPE_TYPE_BYTE,1,255,255,0,NULL); + CreateNamedPipeW(NULL,PIPE_ACCESS_DUPLEX|FILE_FLAG_OVERLAPPED,PIPE_TYPE_BYTE,1,255,255,0,NULL); + return 0; + } +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + win32_fifo_working=yes +else + win32_winver_bump=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "x$win32_fifo_working" != "xyes"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #define WINVER 0x501 + #define _WIN32_WINNT 0x501 + #include + int main(){ + CreateNamedPipeA(NULL,PIPE_ACCESS_DUPLEX|FILE_FLAG_OVERLAPPED,PIPE_TYPE_BYTE,1,255,255,0,NULL); + CreateNamedPipeW(NULL,PIPE_ACCESS_DUPLEX|FILE_FLAG_OVERLAPPED,PIPE_TYPE_BYTE,1,255,255,0,NULL); + return 0; + } +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + win32_fifo_working=yes +else + win32_fifo_working=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + fi + have_mkfifo=$win32_fifo_working + if test "x$win32_fifo_working" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define WANT_WIN32_FIFO 1" >>confdefs.h + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi +fi + +#### WINVER Bump +if test x$win32_specific_codes = xenabled; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if WINVER and _WIN32_WINNT needs version bumps" >&5 +$as_echo_n "checking if WINVER and _WIN32_WINNT needs version bumps... " >&6; } + if test "x$win32_winver_bump" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define WINVER 0x0501" >>confdefs.h + + +$as_echo "#define _WIN32_WINNT 0x0501" >>confdefs.h + + # getaddrinfo and freeaddrinfo are available for Win2K and above + # Bug: MinGW.org w32api ws2tcpip.h incorrectly wants (_WIN32_WINNT >= 0x0501) for getaddrinfo and freeaddrinfo + # MultiByteToWideChar and WideCharToMultiByte are available for Win2K and above + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi +fi + +fi #END OF WIN32 CHECKS + +#### Use Win32 support codes + if test "x$win32_specific_codes" = xenabled ; then + WIN32_CODES_TRUE= + WIN32_CODES_FALSE='#' +else + WIN32_CODES_TRUE='#' + WIN32_CODES_FALSE= +fi + + +if test x"$network" = xauto; then + if test x"$have_network" = xyes; then + network=enabled + else + network=disabled + fi +fi +if test x"$ipv6" = xauto; then + if test x"$have_ipv6" = xyes; then + ipv6=enabled + else + ipv6=disabled + fi +fi + + +if test x"$fifo" = xauto; then + if test x"$have_mkfifo" = xyes; then + fifo=enabled + else + fifo=disabled + fi +fi + +if test x"$fifo" = xenabled; then + +$as_echo "#define FIFO 1" >>confdefs.h + + if test x"$have_mkfifo" = xno; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You forced FIFO code while I think there is no mkfifo() available! " >&5 +$as_echo "$as_me: WARNING: You forced FIFO code while I think there is no mkfifo() available! " >&2;} + fi +fi + +if test x"$network" = xenabled; then + +$as_echo "#define NETWORK 1" >>confdefs.h + + if test x"$have_network" = xno; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You forced network code while I think there is support missing! " >&5 +$as_echo "$as_me: WARNING: You forced network code while I think there is support missing! " >&2;} + fi +fi + +if test x"$ipv6" = xenabled; then + +$as_echo "#define IPV6 1" >>confdefs.h + + if test x"$have_ipv6" = xno; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You forced IPv6 code while I think there is no getaddrinfo() available! " >&5 +$as_echo "$as_me: WARNING: You forced IPv6 code while I think there is no getaddrinfo() available! " >&2;} + fi +fi + + +# Do that here to prevent the above tests usign -lltdl... +if test "x$modules" = xenabled; then + LIBS="-lltdl $LIBS" +fi + +ac_config_files="$ac_config_files Makefile libmpg123.pc mpg123.spec doc/Makefile src/Makefile src/output/Makefile src/libmpg123/Makefile src/libmpg123/mpg123.h" + + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +if test -z "${HAVE_MODULES_TRUE}" && test -z "${HAVE_MODULES_FALSE}"; then + as_fn_error $? "conditional \"HAVE_MODULES\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_ALSA_TRUE}" && test -z "${HAVE_ALSA_FALSE}"; then + as_fn_error $? "conditional \"HAVE_ALSA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_OSS_TRUE}" && test -z "${HAVE_OSS_FALSE}"; then + as_fn_error $? "conditional \"HAVE_OSS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_COREAUDIO_TRUE}" && test -z "${HAVE_COREAUDIO_FALSE}"; then + as_fn_error $? "conditional \"HAVE_COREAUDIO\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_SNDIO_TRUE}" && test -z "${HAVE_SNDIO_FALSE}"; then + as_fn_error $? "conditional \"HAVE_SNDIO\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_SUN_TRUE}" && test -z "${HAVE_SUN_FALSE}"; then + as_fn_error $? "conditional \"HAVE_SUN\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_WIN32_TRUE}" && test -z "${HAVE_WIN32_FALSE}"; then + as_fn_error $? "conditional \"HAVE_WIN32\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_ESD_TRUE}" && test -z "${HAVE_ESD_FALSE}"; then + as_fn_error $? "conditional \"HAVE_ESD\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_JACK_TRUE}" && test -z "${HAVE_JACK_FALSE}"; then + as_fn_error $? "conditional \"HAVE_JACK\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_PORTAUDIO_TRUE}" && test -z "${HAVE_PORTAUDIO_FALSE}"; then + as_fn_error $? "conditional \"HAVE_PORTAUDIO\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_PULSE_TRUE}" && test -z "${HAVE_PULSE_FALSE}"; then + as_fn_error $? "conditional \"HAVE_PULSE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_SDL_TRUE}" && test -z "${HAVE_SDL_FALSE}"; then + as_fn_error $? "conditional \"HAVE_SDL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_NAS_TRUE}" && test -z "${HAVE_NAS_FALSE}"; then + as_fn_error $? "conditional \"HAVE_NAS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_AIX_TRUE}" && test -z "${HAVE_AIX_FALSE}"; then + as_fn_error $? "conditional \"HAVE_AIX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_ALIB_TRUE}" && test -z "${HAVE_ALIB_FALSE}"; then + as_fn_error $? "conditional \"HAVE_ALIB\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_ARTS_TRUE}" && test -z "${HAVE_ARTS_FALSE}"; then + as_fn_error $? "conditional \"HAVE_ARTS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_HP_TRUE}" && test -z "${HAVE_HP_FALSE}"; then + as_fn_error $? "conditional \"HAVE_HP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_OS2_TRUE}" && test -z "${HAVE_OS2_FALSE}"; then + as_fn_error $? "conditional \"HAVE_OS2\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_SGI_TRUE}" && test -z "${HAVE_SGI_FALSE}"; then + as_fn_error $? "conditional \"HAVE_SGI\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_MINT_TRUE}" && test -z "${HAVE_MINT_FALSE}"; then + as_fn_error $? "conditional \"HAVE_MINT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_OPENAL_TRUE}" && test -z "${HAVE_OPENAL_FALSE}"; then + as_fn_error $? "conditional \"HAVE_OPENAL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_DUMMY_TRUE}" && test -z "${HAVE_DUMMY_FALSE}"; then + as_fn_error $? "conditional \"HAVE_DUMMY\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WIN32_CODES_TRUE}" && test -z "${WIN32_CODES_FALSE}"; then + as_fn_error $? "conditional \"WIN32_CODES\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by mpg123 $as_me 1.14.4, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +mpg123 config.status 1.14.4 +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2012 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' +AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' +pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' +ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' +host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' +host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' +host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' +build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' +build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' +build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' +SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' +Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' +GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' +EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' +FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' +LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' +LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' +ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' +exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' +lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' +reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' +AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' +STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' +RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' +lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' +CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' +compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' +GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' +need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' +LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' +libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' +module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' +version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' +runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' +libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' +soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' +install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' +finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' +old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' +striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' + +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in AS \ +DLLTOOL \ +OBJDUMP \ +SHELL \ +ECHO \ +PATH_SEPARATOR \ +SED \ +GREP \ +EGREP \ +FGREP \ +LD \ +NM \ +LN_S \ +lt_SP2NL \ +lt_NL2SP \ +reload_flag \ +deplibs_check_method \ +file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +sharedlib_from_linklib_cmd \ +AR \ +AR_FLAGS \ +archiver_list_spec \ +STRIP \ +RANLIB \ +CC \ +CFLAGS \ +compiler \ +lt_cv_sys_global_symbol_pipe \ +lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_c_name_address \ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +nm_file_list_spec \ +lt_prog_compiler_no_builtin_flag \ +lt_prog_compiler_pic \ +lt_prog_compiler_wl \ +lt_prog_compiler_static \ +lt_cv_prog_compiler_c_o \ +need_locks \ +MANIFEST_TOOL \ +DSYMUTIL \ +NMEDIT \ +LIPO \ +OTOOL \ +OTOOL64 \ +shrext_cmds \ +export_dynamic_flag_spec \ +whole_archive_flag_spec \ +compiler_needs_object \ +with_gnu_ld \ +allow_undefined_flag \ +no_undefined_flag \ +hardcode_libdir_flag_spec \ +hardcode_libdir_separator \ +exclude_expsyms \ +include_expsyms \ +file_list_spec \ +variables_saved_for_relink \ +libname_spec \ +library_names_spec \ +soname_spec \ +install_override_mode \ +finish_eval \ +old_striplib \ +striplib; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in reload_cmds \ +old_postinstall_cmds \ +old_postuninstall_cmds \ +old_archive_cmds \ +extract_expsyms_cmds \ +old_archive_from_new_cmds \ +old_archive_from_expsyms_cmds \ +archive_cmds \ +archive_expsym_cmds \ +module_cmds \ +module_expsym_cmds \ +export_symbols_cmds \ +prelink_cmds \ +postlink_cmds \ +postinstall_cmds \ +postuninstall_cmds \ +finish_cmds \ +sys_lib_search_path_spec \ +sys_lib_dlsearch_path_spec; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +ac_aux_dir='$ac_aux_dir' +xsi_shell='$xsi_shell' +lt_shell_append='$lt_shell_append' + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + + + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile' + + + + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "libmpg123.pc") CONFIG_FILES="$CONFIG_FILES libmpg123.pc" ;; + "mpg123.spec") CONFIG_FILES="$CONFIG_FILES mpg123.spec" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "src/output/Makefile") CONFIG_FILES="$CONFIG_FILES src/output/Makefile" ;; + "src/libmpg123/Makefile") CONFIG_FILES="$CONFIG_FILES src/libmpg123/Makefile" ;; + "src/libmpg123/mpg123.h") CONFIG_FILES="$CONFIG_FILES src/libmpg123/mpg123.h" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + "libtool":C) + + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +# The names of the tagged configurations supported by this script. +available_tags="" + +# ### BEGIN LIBTOOL CONFIG + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Assembler program. +AS=$lt_AS + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Object dumper program. +OBJDUMP=$lt_OBJDUMP + +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + +# What type of objects to build. +pic_mode=$pic_mode + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that protects backslashes. +ECHO=$lt_ECHO + +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP=$lt_GREP + +# An ERE matcher. +EGREP=$lt_EGREP + +# A literal string matcher. +FGREP=$lt_FGREP + +# A BSD- or MS-compatible name lister. +NM=$lt_NM + +# Whether we need soft or hard links. +LN_S=$lt_LN_S + +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len + +# Object file suffix (normally "o"). +objext=$ac_objext + +# Executable file suffix (normally ""). +exeext=$exeext + +# whether the shell understands "unset". +lt_unset=$lt_unset + +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL + +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP + +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method = "file_magic". +file_magic_cmd=$lt_file_magic_cmd + +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + +# The archiver. +AR=$lt_AR + +# Flags to create an archive. +AR_FLAGS=$lt_AR_FLAGS + +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + +# A symbol stripping program. +STRIP=$lt_STRIP + +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + +# A C compiler. +LTCC=$lt_CC + +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec + +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL + +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 + +# Old archive suffix (normally "a"). +libext=$libext + +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink + +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Library versioning type. +version_type=$version_type + +# Shared library runtime path variable. +runpath_var=$runpath_var + +# Shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + + +# The linker used to build libraries. +LD=$lt_LD + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds + +# A language specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU compiler? +with_gcc=$GCC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + +ltmain="$ac_aux_dir/ltmain.sh" + + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +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}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi + + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + + + + + +echo " + $PACKAGE_NAME $PACKAGE_VERSION + + Install path ............ $prefix + CPU Optimization ........ $cpu_type + Compiler Optimization ... $with_optimization + Gapless Support ......... $gapless + Debugging ............... $debugging + Seek table size ......... $seektable + FIFO support ............ $fifo + Buffer .................. $buffer + Network (http streams) .. $network + Network Sockets ......... $network_type + IPv6 (getaddrinfo) ...... $ipv6" +if test x"$LARGEFILE_BITS" = x; then + echo " File offsets ............ default" +else + echo " File offsets ............ $LARGEFILE_BITS" + echo " The lib will (try to) support default offset size, too." +fi +echo " LFS alias symbols ....... $lfs_alias ($LFS_ALIAS_BITS)" + +echo " Alignment checks ........ $aligncheck" +if test x"$aligncheck" = xenabled; then + if test x"$ccalign" != xyes; then + echo " (without effect since special alignment is not employed)" + fi + if test x"$GCC" = xyes; then + echo " (note that newer gcc 4.x versions do not use/need the align check)" + fi +fi +echo -n " + Core libmpg123 features: + Integer conversion ...... $integers + New/old WRITE_SAMPLE .... $newoldwritesample + Layer I ................. $layer1 + Layer II ................ $layer2 + Layer III ............... $layer3 + NtoM resampling ......... $ntom + downsampled decoding .... $downsample + Feeder/buffered input ... $feeder + ID3v2 parsing ........... $id3v2 + String API .............. $string + ICY parsing/conversion .. $icy + Error/warning messages .. $messages + Win32 Unicode File Open.. $win32_unicode + Feature Report Function.. $feature_report + Output formats (nofpu will disable all but 16 or 8 bit!): + 8 bit integer ........... $int8 + 16 bit integer .......... $int16 + 32/24 bit integer ....... $int32 + real (32 bit float) ..... $real + +Note: Disabling core features is not commonly done and some combinations might not build/work. If you encounter such a case, help yourself (and provide a patch) or just poke the maintainers. +" +# just an empty line +echo + +echo " Modules ................. $modules" +echo " Module suffix ........... $with_module_suffix" +echo " Checked audio modules ... $check_modules + Detected audio support ..$output_modules + Default output module ... $default_output_module +" +if test x"$modules" = xdisabled; then +echo "The _single_ active output module is being statically linked in. +" +fi +if test x"$with_optimization" = x0; then + echo "No optimization flags chosen, make sure you have something basic in your CFLAGS at least... +" +fi +if test x"$debugging" = xenabled; then + echo "CFLAGS='$CFLAGS'" + echo "LIBS='$LIBS'" +else + echo "Next type 'make' and then 'make install'." +fi diff --git a/deps/mpg123/configure.ac b/deps/mpg123/configure.ac new file mode 100644 index 0000000..f4badf5 --- /dev/null +++ b/deps/mpg123/configure.ac @@ -0,0 +1,2178 @@ +dnl configure.ac: source for the configure script + +dnl copyright by the mpg123 project - free software under the terms of the LGPL 2.1 +dnl see COPYING and AUTHORS files in distribution or http://mpg123.org +dnl initially written by Nicholas J. Humfrey + +dnl Require autoconf version >= 2.57 +AC_PREREQ(2.57) + + +dnl ############# Initialisation +AC_INIT([mpg123], [1.14.4], [mpg123-devel@lists.sourceforge.net]) +dnl Increment API_VERSION when the API gets changes (new functions). +API_VERSION=36 +LIB_PATCHLEVEL=6 +dnl Since we want to be backwards compatible, both sides get set to API_VERSION. +LIBMPG123_VERSION=$API_VERSION:$LIB_PATCHLEVEL:$API_VERSION +AC_SUBST(LIBMPG123_VERSION) +AC_SUBST(API_VERSION) + +AC_CONFIG_SRCDIR(src/mpg123.c) +AC_CONFIG_AUX_DIR(build) +AC_CONFIG_SRCDIR(doc) +AC_CONFIG_MACRO_DIR([m4]) +AC_CANONICAL_HOST + +dnl Version 1.7 of automake is recommended +AM_INIT_AUTOMAKE(1.7) +AM_CONFIG_HEADER(src/config.h) + + +# You get strange symptoms like jack module build failing because the AC_C_CONST failed to detect the working const support. +# In that case, the test failed because -Werror, not because no const there... +# After looking again, there are possibly more tests being obscured by false failures. +AC_MSG_CHECKING([for -Werror in CFLAGS (It breaks tests)]) +if echo "$CFLAGS" | grep Werror; then + AC_MSG_RESULT([yes]) + AC_MSG_WARN([You have -Werror in CFLAGS. That may break some tests and make this configure bogus. +If you want paranoid compilation, use --enable-nagging option, which adds -Werror for gcc. +Also note that you shall not run make distcheck after configuring with --enable-nagging. +distcheck uses the generated CFLAGS... +Anyhow, continuing at your own risk.]) +else + AC_MSG_RESULT([no]) +fi + +buffer=enabled # try to build with buffer by default + +dnl ############# Compiler and tools Checks + +LT_LDFLAGS=-export-dynamic +EXEC_LT_LDFLAGS= +be_static=no +all_static=no +AC_MSG_CHECKING([if you are up to something totally static with LDFLAGS/CFLAGS]) +for f in $LDFLAGS $CFLAGS +do + case "$f" in + -all-static) + be_static=yes + all_static=yes + ;; + -static) + be_static=yes + ;; + esac +done +if test "x$be_static" = xyes; then + AC_MSG_RESULT([yes]) + LT_LDFLAGS=-all-static + EXEC_LT_LDFLAGS="$LT_LDFLAGS" +else + AC_MSG_RESULT([no]) +fi +if test "x$all_static" = xyes; then + AC_MSG_WARN( Use -static in LDFLAGS for all-static linking! Your compiler may blow up on that -all-static. ) +fi + +AM_PROG_AS +AC_PROG_CC +AC_PROG_CPP +AC_PROG_INSTALL +dnl "Checking for egrep is broken after removal of libltdl stuff... checks use $EGREP, so searching it here." +AC_PROG_EGREP +AC_C_CONST +AC_INLINE +AC_C_BIGENDIAN + +dnl ############# Use Libtool for dynamic module loading + +modules=auto +OUTPUT_OBJ="module.\$(OBJEXT)" +AC_ARG_ENABLE(modules, +[ --enable-modules=[no/yes] dynamically loadable output modules], +[ + if test "x$enableval" = xyes + then + modules=enabled + else + modules=disabled + fi +], +[ + if test "x$be_static" = "xyes"; then + modules=disabled + else + modules=auto + fi +]) + +dnl We only want shared libraries by default +AC_DISABLE_STATIC +AC_ENABLE_SHARED + +if test x"$enable_shared" = xno; then + modules=disabled + LT_LDFLAGS= +else + AC_DEFINE(DYNAMIC_BUILD, 1, [ Define if building with dynamcally linked libmpg123]) +fi + +if test x"$modules" = xdisabled +then + echo "Modules disabled, not checking for libltdl." +else + have_ltdl=no + AC_CHECK_LIB( [ltdl], [lt_dlinit], + [ AC_CHECK_HEADER( [ltdl.h], + [ + have_ltdl=yes + AC_DEFINE(HAVE_LTDL, 1, [ Define if libltdl is available ]) + ], + [ + AC_MSG_WARN([Found ltdl library but NOT the header file on your system]) + ] ) + ], + [ + AC_MSG_WARN([ltdl library not found]) + ] + ) + if test x"$modules" = xenabled -a x"$have_ltdl" = xno; then + AC_MSG_ERROR([Modules enabled but no libltdl found! This will not work...]) + fi + if test x"$modules" = xauto; then + if test x"$have_ltdl" = xyes; then + modules=enabled + echo "We found libltdl: Modules enabled." + else + echo "We did not find libltdl: Modules disabled." + modules=disabled + fi + fi +fi + +if test x"$modules" = xdisabled +then + echo "Modules disabled." +else +# Enable module support in source code +AC_DEFINE( USE_MODULES, 1, [Define if modules are enabled] ) +fi + +dnl Configure libtool + +AC_LIBTOOL_WIN32_DLL +AM_PROG_LIBTOOL + +if test x"$modules" = xdisabled +then + echo "Modules still disabled..." + MODULE_OBJ="legacy_module.\$(OBJEXT)" +else + MODULE_OBJ="module.\$(OBJEXT)" +fi + +AM_CONDITIONAL( [HAVE_MODULES], [test "x$modules" = xenabled] ) + +AC_SUBST(MODULE_OBJ) +AC_SUBST(LT_LDFLAGS) +AC_SUBST(EXEC_LT_LDFLAGS) + +dnl ############## Configurable Options + +AC_ARG_ENABLE(debug, + [ --enable-debug=[no/yes] turn on debugging], + [ + if test "x$enableval" = xyes + then + debugging="enabled" + else + debugging="disabled" + fi + ], + [ debugging="disabled" ] +) + +AC_ARG_ENABLE(nagging, + [ --enable-nagging=[no/yes] turn on GCC's pedantic nagging with error on warnings, also enables debugging ], + [ + if test "x$enableval" = xyes + then + nagging="enabled" + debugging="enabled" + else + nagging="disabled" + fi + ], + [ nagging="disabled" ] +) + +if test x"$debugging" = xenabled; then + AC_DEFINE(DEBUG, 1, [ Define if debugging is enabled. ]) +fi + +AC_ARG_ENABLE(gapless, + [ --enable-gapless=[no/yes] turn on gapless (enabled per default)], + [ + if test "x$enableval" = xyes + then + gapless="enabled" + AC_DEFINE(GAPLESS, 1, [ Define if gapless is enabled. ]) + else + gapless="disabled" + fi + ], + [ + gapless="enabled" + AC_DEFINE(GAPLESS, 1, [ Define if gapless is enabled. ]) + ] +) + +AC_ARG_ENABLE(fifo, + [ --enable-fifo=[no/yes] FIFO support for control interface (auto-enabled on linux) ], + [ + if test "x$enableval" = xyes + then + fifo="enabled" + else + fifo="disabled" + fi + ], + [ + fifo="auto" + ] +) + +AC_ARG_ENABLE(ipv6, + [ --enable-ipv6=[no/yes] IPv6 support (actually any protocol your libc does with getaddrinfo) ], + [ + if test "x$enableval" = xyes + then + ipv6="enabled" + else + ipv6="disabled" + fi + ], + [ + ipv6="auto" + ] +) + +AC_ARG_ENABLE(network, + [ --enable-network=[no/yes] network support (http streams / webradio) ], + [ + if test "x$enableval" = xyes + then + network="enabled" + else + network="disabled" + fi + ], + [ + network="auto" + ] +) + +dnl Optional objects list, depends on decoder choice and core feature selection. +dnl Not just for specific decoders anymore... +s_fpu= +DECODER_OBJ= +DECODER_LOBJ= + +dnl Core features that can be disabled to reduce binary size. + +id3v2=enabled +AC_ARG_ENABLE(id3v2, + [ --disable-id3v2=[no/yes] no ID3v2 parsing ], + [ + if test "x$enableval" = xno; then + id3v2="disabled" + fi + ], []) + +# id3v2 depends on strings... so check that in between. +string=enabled +AC_ARG_ENABLE(string, + [ --disable-string=[no/yes] no string API (this will disable ID3v2; main mpg123 won't build anymore) ], + [ + if test "x$enableval" = xno; then + string="disabled" + fi + ], []) + +if test "x$string" = "xdisabled"; then + AC_DEFINE(NO_STRING, 1, [ Define to disable string functions. ]) + id3v2=disabled + AC_MSG_WARN([ID3v2 support disabled because of string API being disabled.]) +else + DECODER_OBJ="$DECODER_OBJ stringbuf.\$(OBJEXT)" + DECODER_LOBJ="$DECODER_LOBJ stringbuf.lo" +fi + +if test "x$id3v2" = "xdisabled"; then + AC_DEFINE(NO_ID3V2, 1, [ Define to disable ID3v2 parsing. ]) +fi + +icy=enabled +AC_ARG_ENABLE(icy, + [ --disable-icy=[no/yes] no ICY metainfo parsing/conversion (main mpg123 won't build!) ], + [ + if test "x$enableval" = xno; then + icy="disabled" + fi + ], []) + +if test "x$icy" = "xdisabled"; then + AC_DEFINE(NO_ICY, 1, [ Define to disable ICY handling. ]) +else + DECODER_OBJ="$DECODER_OBJ icy.\$(OBJEXT) icy2utf8.\$(OBJEXT)" + DECODER_LOBJ="$DECODER_LOBJ icy.lo icy2utf8.lo" +fi + +ntom=enabled +AC_ARG_ENABLE(ntom, + [ --disable-ntom=[no/yes] no flexible resampling ], + [ + if test "x$enableval" = xno; then + ntom="disabled" + fi + ], []) + +if test "x$ntom" = "xdisabled"; then + AC_DEFINE(NO_NTOM, 1, [ Define to disable ntom resampling. ]) +else + DECODER_OBJ="$DECODER_OBJ ntom.\$(OBJEXT)" + DECODER_LOBJ="$DECODER_LOBJ ntom.lo" +fi + +downsample=enabled +AC_ARG_ENABLE(downsample, + [ --disable-downsample=[no/yes] no downsampled decoding ], + [ + if test "x$enableval" = xno; then + downsample="disabled" + fi + ], []) + +if test "x$downsample" = "xdisabled"; then + AC_DEFINE(NO_DOWNSAMPLE, 1, [ Define to disable downsampled decoding. ]) +fi + +feeder=enabled +AC_ARG_ENABLE(feeder, + [ --disable-feeder=[no/yes] no feeder decoding, no buffered readers ], + [ + if test "x$enableval" = xno; then + feeder="disabled" + fi + ], []) + +if test "x$feeder" = "xdisabled"; then + AC_DEFINE(NO_FEEDER, 1, [ Define to disable feeder and buffered readers. ]) +fi + +messages=enabled +AC_ARG_ENABLE(messages, + [ --disable-messages=[no/yes] no error/warning messages on the console ], + [ + if test "x$enableval" = xno; then + messages="disabled" + fi + ], []) + +if test "x$messages" = "xdisabled"; then + AC_DEFINE(NO_WARNING, 1, [ Define to disable warning messages. ]) + AC_DEFINE(NO_ERRORMSG, 1, [ Define to disable error messages. ]) + AC_DEFINE(NO_ERETURN, 1, [ Define to disable error messages in combination with a return value (the return is left intact). ]) +fi + +integers=fast +AC_ARG_ENABLE(int-quality, +[ --enable-int-quality=[yes/no] use rounding instead of fast truncation for integer output, where possible ], +[ + if test "x$enableval" = xyes; then + integers=quality + AC_DEFINE(ACCURATE_ROUNDING, 1, [ Define to use proper rounding. ]) + fi +], []) + +int16=enabled +AC_ARG_ENABLE(16bit, + [ --disable-16bit=[no/yes] no 16 bit integer output ], + [ + if test "x$enableval" = xno; then + int16="disabled" + fi + ], []) + +int8=enabled +AC_ARG_ENABLE(8bit, + [ --disable-8bit=[no/yes] no 8 bit integer output ], + [ + if test "x$enableval" = xno; then + int8="disabled" + fi + ], []) + +int32=enabled +AC_ARG_ENABLE(32bit, + [ --disable-32bit=[no/yes] no 32 bit integer output (also 24 bit) ], + [ + if test "x$enableval" = xno; then + int32="disabled" + fi + ], []) + +real=enabled +AC_ARG_ENABLE(real, + [ --disable-real=[no/yes] no real (floating point) output ], + [ + if test "x$enableval" = xno; then + real="disabled" + fi + ], []) + +AC_ARG_WITH([cpu], [ + --with-cpu=generic[_fpu] Use generic processor code with floating point arithmetic + --with-cpu=generic_float Plain alias to generic_fpu now... float output is a normal runtime option! + --with-cpu=generic_nofpu Use generic processor code with fixed point arithmetic (p.ex. ARM, experimental) + --with-cpu=generic_dither Use generic processor code with floating point arithmetic and dithering for 1to1 16bit decoding. + --with-cpu=i386[_fpu] Use code optimized for i386 processors with floating point arithmetic + --with-cpu=i386_nofpu Use code optimized for i386 processors with fixed point arithmetic (experimental) + --with-cpu=i486 Use code optimized for i486 processors (only usable alone!) + --with-cpu=i586 Use code optimized for i586 processors + --with-cpu=i586_dither Use code optimized for i586 processors with dithering (noise shaping), adds 256K to binary size + --with-cpu=3dnow Use code optimized for 3DNow processors + --with-cpu=3dnowext Use code optimized for 3DNowExt processors (K6-3+, Athlon) + --with-cpu=3dnowext_alone Really only 3DNowExt decoder, without 3DNow fallback for flexible rate + --with-cpu=mmx Use code optimized for MMX processors + --with-cpu=mmx_alone Really only MMX decoder, without i586 fallback for flexible rate + --with-cpu=sse Use code optimized for SSE processors + --with-cpu=sse_alone Really only SSE decoder, without i586 fallback for flexible rate + --with-cpu=x86 Pack all x86 opts into one binary (excluding i486, including dither) + --with-cpu=x86-64 Use code optimized for x86-64 processors (AMD64 and Intel64, including dithered generic) + --with-cpu=altivec Use code optimized for Altivec processors (PowerPC G4 and G5) + --with-cpu=ppc_nofpu Use code optimized for PowerPC processors with fixed point arithmetic (experimental) + --with-cpu=neon Use code optimized for ARM NEON SIMD engine (Cortex-A series) + --with-cpu=arm_nofpu Use code optimized for ARM processors with fixed point arithmetic (experimental) +]) + + +# opt-in for IEEE754 floating point action +# We want to make sure not to apply hacks relying on IEEE754 storage format on platforms where we did not make sure that this actually is valid. +# It _should_ be fine for about all computers still out there, but we play safe. +ieee=no +case $host in + i?86-*|x86_64-*|powerpc*|sparc*) + ieee=yes + ;; +esac +if test "x$ieee" = xyes; then + echo "We assume IEEE754 floating point format." + AC_DEFINE(IEEE_FLOAT, 1, [ Define to indicate that float storage follows IEEE754. ]) +fi + +newoldwritesample=disabled +case $host in + arm*-*-linux*) + # check that... perhaps we are better off on arm with kernel math emulation + cpu_type="arm_nofpu" + ;; + i386-*-linux*|i386-*-kfreebsd*-gnu) + cpu_type="i386_fpu" + newoldwritesample=enabled + ;; + i486-*-linux*|i486-*-kfreebsd*-gnu) + cpu_type="i486" + newoldwritesample=enabled + ;; + i586-*-linux*|i586-*-kfreebsd*-gnu) + cpu_type="x86" + newoldwritesample=enabled + ;; + i686-*-linux*|i686-*-kfreebsd*-gnu) + cpu_type="x86" + newoldwritesample=enabled + ;; + x86_64-*-linux*|x86_64-*-kfreebsd*-gnu) + cpu_type="x86-64_all" + ;; + *-*-linux*|*-*-kfreebsd*-gnu) + cpu_type="generic_fpu" + ;; + i386-apple-darwin10*) + AC_MSG_CHECKING([if CPU type supports x86-64]) + case `sysctl -n hw.optional.x86_64` in + 1) + AC_MSG_RESULT([yes]) + cpu_type="x86-64_all" + ;; + *) + AC_MSG_RESULT([no]) + cpu_type="x86" + newoldwritesample=enabled + ;; + esac + ;; + i386-apple-darwin*) + cpu_type="x86" + newoldwritesample=enabled + ;; + x86_64-apple-darwin*) + cpu_type="x86-64_all" + ;; + *-apple-darwin*) + AC_MSG_CHECKING([if CPU type supports AltiVec]) + case `machine` in + ppc7400 | ppc7450 | ppc970) + AC_MSG_RESULT([yes]) + cpu_type="altivec" + ;; + *) + AC_MSG_RESULT([no]) + cpu_type="generic_fpu" + ;; + esac + ;; + i?86-*-dragonfly* | i?86-*-freebsd* | i?86-*-midnightbsd* | i?86-*-mirbsd* | i?86-*-netbsd* | i?86-*-openbsd*) + cpu_type="x86" + newoldwritesample=enabled + ;; + x86_64-*-dragonfly* | x86_64-*-freebsd* | x86_64-*-midnightbsd* | x86_64-*-mirbsd* | x86_64-*-netbsd* | x86_64-*-openbsd*) + cpu_type="x86-64_all" + ;; + *-*-dragonfly* | *-*-freebsd* | *-*-midnightbsd* | *-*-mirbsd* | *-*-netbsd* | *-*-openbsd*) + cpu_type="generic_fpu" + ;; + i386-*-solaris*) + cpu_type=x86 + newoldwritesample=enabled + ;; + x86_64-*-solaris*) + cpu_type=x86-64_all + ;; + *-*-solaris*) + cpu_type="generic_fpu" + ;; + # os2-emx = OS/2 with some Unix fun; so p.ex. buffer works. + # Till we sorted out the assembler troubles, generic CPU is default. + i386-pc-os2-emx) + cpu_type=generic_fpu + newoldwritesample=enabled + ;; + x86_64-pc-os2-emx) + # We are optimistic hat the future knows OS/2 on x86-64;-) + cpu_type=generic_fpu + ;; + *-pc-os2-emx) + cpu_type="generic_fpu" + ;; + *-dec-osf*) + cpu_type="generic_fpu" + ;; + x86_64-pc-cygwin*) + cpu_type="x86-64_all" + ;; + i686-pc-cygwin*) + cpu_type="x86" + newoldwritesample=enabled + ;; + i586-pc-cygwin*) + cpu_type="x86" + newoldwritesample=enabled + ;; + i486-pc-cygwin*) + cpu_type="i486" + newoldwritesample=enabled + ;; + i386-pc-cygwin*) + cpu_type="i386" + newoldwritesample=enabled + ;; + *-pc-cygwin*) + cpu_type="generic_fpu" + ;; + i@<:@3-7@:>@86-*-mingw32*) + LIBS="$LIBS" + buffer=disabled + cpu_type="x86" + newoldwritesample=enabled + ;; + x86_64-*-mingw32*) + LIBS="$LIBS" + buffer=disabled + cpu_type="x86-64" + ;; + i386-*) + AC_MSG_WARN([Unknown host operating system]) + cpu_type="i386" + buffer=disabled + ADD_CPPFLAGS="-DGENERIC $ADD_CPPFLAGS" + newoldwritesample=enabled + ;; + i486-*) + AC_MSG_WARN([Unknown host operating system]) + cpu_type="i486" + buffer=disabled + ADD_CPPFLAGS="-DGENERIC $ADD_CPPFLAGS" + newoldwritesample=enabled + ;; + i586-*) + AC_MSG_WARN([Unknown host operating system]) + cpu_type="x86" + buffer=disabled + ADD_CPPFLAGS="-DGENERIC $ADD_CPPFLAGS" + newoldwritesample=enabled + ;; + i686-*) + AC_MSG_WARN([Unknown host operating system]) + cpu_type="x86" + buffer=disabled + ADD_CPPFLAGS="-DGENERIC $ADD_CPPFLAGS" + newoldwritesample=enabled + ;; + x86_64-*) + AC_MSG_WARN([Unknown host operating system]) + cpu_type="x86-64_all" + buffer=disabled + ADD_CPPFLAGS="-DGENERIC $ADD_CPPFLAGS" + ;; + *) + AC_MSG_WARN([Unknown host operating system]) + cpu_type="generic_fpu" + buffer=disabled + ADD_CPPFLAGS="-DGENERIC $ADD_CPPFLAGS" + ;; +esac + +AC_ARG_ENABLE(buffer, + [ --enable-buffer=[yes/no] disable audio buffer code (default uses system whitelist... proper checks later) ], + [ + if test "x$enableval" = xyes + then + echo "Note: Enabling buffer per request... perhaps it will not build anyway." + buffer="enabled" + else + echo "Note: Disabling buffer per request." + buffer="disabled" + fi + ] +) + +AC_ARG_ENABLE(newoldwritesample, +[ --enable-newoldwritesample=[no/yes] enable new/old WRITE_SAMPLE macro for non-accurate 16 bit output, faster on certain CPUs (default on on x86-32)], +[ + if test "x$enableval" = xyes + then + newoldwritesample=enabled + else + newoldwritesample=disabled + fi +]) + + + +dnl Did user choose other CPU type ? +if test "x$with_cpu" != "x"; then + cpu_type=$with_cpu +fi + +if test "x$cpu_type" = "xgeneric_nofpu"; then + real=disabled + int32=disabled +fi + +if test "x$cpu_type" = "xi386_nofpu"; then + real=disabled + int32=disabled +fi + +if test "x$cpu_type" = "xppc_nofpu"; then + real=disabled + int32=disabled +fi + +if test "x$cpu_type" = "xarm_nofpu"; then + real=disabled + int32=disabled +fi + +if test "x$int16" = "xdisabled"; then + AC_DEFINE(NO_16BIT, 1, [ Define to disable 16 bit integer output. ]) +else + DECODER_OBJ="$DECODER_OBJ synth.\$(OBJEXT)" + DECODER_LOBJ="$DECODER_LOBJ synth.lo" +fi + +# 8bit works only through 16bit +if test "x$int16" = "xdisabled"; then + int8=disabled +fi +if test "x$int8" = "xdisabled"; then + AC_DEFINE(NO_8BIT, 1, [ Define to disable 8 bit integer output. ]) +else + DECODER_OBJ="$DECODER_OBJ synth_8bit.\$(OBJEXT)" + DECODER_LOBJ="$DECODER_LOBJ synth_8bit.lo" +fi + +if test "x$int32" = "xdisabled"; then + AC_DEFINE(NO_32BIT, 1, [ Define to disable 32 bit and 24 bit integer output. ]) +else + s_fpu="$s_fpu synth_s32" +fi + +if test "x$real" = "xdisabled"; then + AC_DEFINE(NO_REAL, 1, [ Define to disable real output. ]) +else + s_fpu="$s_fpu synth_real" +fi + + + +layer1=enabled +AC_ARG_ENABLE(layer1, + [ --disable-layer1=[no/yes] no layer I decoding ], + [ + if test "x$enableval" = xno; then + layer1="disabled" + fi + ], []) + +if test "x$layer1" = "xdisabled"; then + AC_DEFINE(NO_LAYER1, 1, [ Define to disable layer I. ]) +else + # layer1 needs code in layer2 + DECODER_OBJ="$DECODER_OBJ layer1.\$(OBJEXT) layer2.\$(OBJEXT)" + DECODER_LOBJ="$DECODER_LOBJ layer1.lo layer2.lo" +fi + +layer2=enabled +AC_ARG_ENABLE(layer2, + [ --disable-layer2=[no/yes] no layer II decoding ], + [ + if test "x$enableval" = xno; then + layer2="disabled" + fi + ], []) + +if test "x$layer2" = "xdisabled"; then + AC_DEFINE(NO_LAYER2, 1, [ Define to disable layer II. ]) +else + # layer1 may have added the objects already + if test "x$layer1" = "xdisabled"; then + DECODER_OBJ="$DECODER_OBJ layer2.\$(OBJEXT)" + DECODER_LOBJ="$DECODER_LOBJ layer2.lo" + fi +fi + +layer3=enabled +AC_ARG_ENABLE(layer3, + [ --disable-layer3=[no/yes] no layer III decoding ], + [ + if test "x$enableval" = xno; then + layer3="disabled" + fi + ], []) + +if test "x$layer3" = "xdisabled"; then + AC_DEFINE(NO_LAYER3, 1, [ Define to disable layer III. ]) +else + DECODER_OBJ="$DECODER_OBJ layer3.\$(OBJEXT)" + DECODER_LOBJ="$DECODER_LOBJ layer3.lo" +fi + +AC_ARG_WITH([audio], [ + --with-audio= Select a list (or only one) of audio output modules (comma or space separated list). +]) +AC_ARG_WITH([default-audio], [ + --with-default-audio=aix Use AIX as default audio output sub-system + --with-default-audio=alib Use Alib as default audio output sub-system (for HPUX) + --with-default-audio=alsa Use ALSA as default audio output sub-system + --with-default-audio=arts Use aRts as default audio output sub-system (KDE sound server) + --with-default-audio=dummy Use dummy as default audio (when no sound card is available) + --with-default-audio=esd Use ESoundD as default audio output sub-system + --with-default-audio=hp Use HP as default audio output sub-system + --with-default-audio=jack Use JACK as default low-latency audio server + --with-default-audio=coreaudio Use Mac OS X as default audio output sub-system (CoreAudio) + --with-default-audio=mint Use MinT as default audio output sub-system (Atari) + --with-default-audio=nas Use NAS as default audio output (Network Audio System) + --with-default-audio=os2 Use OS2 as default audio output sub-system + --with-default-audio=oss Use OSS as default audio output sub-system (/dev/dsp) + --with-default-audio=portaudio Use PortAudio as default audio output sub-system + --with-default-audio=pulse Use Pulse audio server as default audio output sub-system + --with-default-audio=sdl Use SDL as default audio output sub-system (Simple DirectMedia Layer) + --with-default-audio=sgi Use SGI as default audio output sub-system (IRIX) + --with-default-audio=sndio Use OpenBSD's sndio as default audio output sub-system + --with-default-audio=sun Use Sun as default audio output sub-system (/dev/audio) + --with-default-audio=win32 Use Win32 audio as default audio output sub-system +]) + +AC_ARG_WITH([optimization], [ + --with-optimization=0 No Optimization + --with-optimization=1 Limited Optimization (-O) (for gcc) + --with-optimization=2 Default Optimization (-O2 ...) (for gcc) + --with-optimization=3 More Optimize than default (-O3 ...) (for gcc) + --with-optimization=4 Optimize yet more (-O4 ...) (for gcc) +]) + +AC_ARG_WITH([seektable], [ + --with-seektable= choose size of seek index table (0 disables it), default 1000 +]) + + +dnl ############## Modules + +# Dummy audio output module is always supported +output_modules="dummy" + +# Decide on module file suffix. Setting it != .la allows removal of .la files. +AC_ARG_WITH([module-suffix], [ + --with-module-suffix=.la (default) Use libtool's .la files for loading modules. + --with-module-suffix=[.so|.dll|...] Specify the native module file suffix to bypass .la files. +]) +if test x"$with_module_suffix" = x; then + with_module_suffix=.la +fi +AC_DEFINE_UNQUOTED( MODULE_FILE_SUFFIX, "$with_module_suffix", [The suffix for module files.] ) + +dnl ############## Assembler, compiler properties + +# based on posting from John Dalgliesh on ffmpeg (LGPL) mailing list +# find if .align arg is power-of-two or not +asmalign_exp="unknown" +if test x"$asmalign_exp" = xunknown; then + AC_MSG_CHECKING([if .align takes 2-exponent]) + asmalign_exp="no" + echo '.align 3' > conftest.s + if $CCAS -c -o conftest.o conftest.s 1>/dev/null 2>&1; then + asmalign_exp="yes" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + rm -f conftest.o conftest.s +fi +if test x"$asmalign_exp" = xyes; then + AC_DEFINE(ASMALIGN_EXP, 1, [ Define if .align takes 3 for alignment of 2^3=8 bytes instead of 8. ]) +fi + +ccalign="unknown" +if test x"$ccalign" = xunknown; then + AC_MSG_CHECKING([__attribute__((aligned(16)))]) + ccalign="no" + echo '__attribute__((aligned(16))) float var;' > conftest.c + if $CC -c -o conftest.o conftest.c >/dev/null 2>&1; then + ccalign="yes" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + rm -f conftest.o conftest.c +fi + +dnl We apply alignment hints only to cpus that need it. +dnl See further below for the definition of CCALIGN + +dnl ############## Really basic headers, needed for other checks. + +AC_HEADER_STDC +dnl Is it too paranoid to specifically check for stdint.h and limits.h? +AC_CHECK_HEADERS([stdio.h stdlib.h string.h unistd.h sched.h sys/ioctl.h sys/types.h stdint.h limits.h inttypes.h sys/time.h sys/wait.h sys/resource.h sys/signal.h signal.h]) + +dnl ############## Types + +dnl Large file support stuff needs cleanup. There are superfluous variables. + +dnl Detect large file support, enable switches if needed. +AC_SYS_LARGEFILE +dnl If we do have a switch for large files, rename off_t-aware API calls. +dnl Using the file_offset_bits variable here is fine for linux (possibly Solaris), +dnl Others... we'll have to see. +dnl Note: I started writing this with with multiline replacements. +dnl Does not work. Automake insists on putting these into Makefiles where they break things. +if test "x$ac_cv_sys_file_offset_bits" = x || echo "$ac_cv_sys_file_offset_bits" | $GREP '@<:@^0-9@:>@' > /dev/null; then + dnl if it has non-numeric chars or is empty... ignore... + LFS_LOBJ= +else + # Add dual-mode wrapper code. + LFS_LOBJ=lfs_wrap.lo +fi + +# Using the lower level macros instead of AC_TYPE_* for compatibility with not freshest autoconf. +AC_CHECK_TYPE(size_t, unsigned long) +AC_CHECK_TYPE(uintptr_t, unsigned long) +AC_CHECK_TYPE(ssize_t, long) +AC_CHECK_TYPE(off_t, long int) +AC_CHECK_TYPE(int32_t, int) +AC_CHECK_TYPE(uint32_t, unsigned int) +AC_CHECK_TYPE(int16_t, short) +AC_CHECK_TYPE(uint16_t, unsigned short) +AC_CHECK_SIZEOF(size_t,4) +AC_CHECK_SIZEOF(ssize_t,4) +AC_CHECK_SIZEOF(off_t,4) +AC_CHECK_SIZEOF(int32_t) +AC_CHECK_SIZEOF(long,4) + +# The alias functions want to know the native off_t bits. +# "Native" also means large file offsets, if enabled, it's what is native to the mpg123 library. +if test "x$ac_cv_sizeof_long" = "x"; then + AC_MSG_ERROR([Cannot determine sizeof(long)?]) +else + LFS_ALIAS_BITS=`expr "$ac_cv_sizeof_long" "*" "8"` + AC_DEFINE_UNQUOTED([LFS_ALIAS_BITS], $LFS_ALIAS_BITS, + [Define this to the size of long type in bits, used for LFS small/native alias functions.]) +fi + +lfs_alias=enabled +AC_ARG_ENABLE(lfs-alias, + [ --disable-lfs-alias disable alias wrappers for largefile bitness (mpg123_seek_32 in addition to mpg123_seek, mpg123_seek_64 as alias on x86-64) ], + [ + if test "x$enableval" = xno; then + lfs_alias="disabled" + fi + ], + [ + case $host in + *-cygwin*) + lfs_alias="disabled" + AC_MSG_NOTICE([lfs-alias disabled for Cygwin, use --enable-lfs-alias explicitly to enable, only if you know what you are doing]) + ;; + esac + + ]) + +AC_MSG_CHECKING([if we want to enable alias wrappers for largefile]) +if test "x$lfs_alias" = "xenabled"; then + AC_MSG_RESULT([yes]) + LFS_LOBJ="$LFS_LOBJ lfs_alias.lo" +else + AC_MSG_RESULT([no]) +fi + +AC_SUBST(LFS_LOBJ) + + +dnl ############## Function Checks + +AC_FUNC_MMAP + +# Check if system supports termios +AC_SYS_POSIX_TERMIOS +if test "x$ac_cv_sys_posix_termios" = "xyes"; then + AC_DEFINE_UNQUOTED([HAVE_TERMIOS], 1, + [Define this if you have the POSIX termios library]) +fi + +AC_CHECK_FUNCS( random ) + +# Check for sched_setscheduler +AC_CHECK_FUNCS( sched_setscheduler setuid getuid) + +# Check for setpriority +AC_CHECK_FUNCS( setpriority ) + +AC_CHECK_FUNCS( strerror ) + +AC_CHECK_FUNCS( setlocale nl_langinfo ) + +AC_CHECK_FUNCS( strdup ) + +AC_CHECK_FUNCS( atoll ) + +AC_CHECK_FUNCS( mkfifo, [ have_mkfifo=yes ], [ have_mkfifo=no ] ) + +dnl ############## Header and Library Checks + +# locale headers +AC_CHECK_HEADERS([locale.h langinfo.h]) +# Headers for network (http) stuff +network_type=Unknown +AC_CHECK_HEADERS([netdb.h sys/param.h sys/socket.h netinet/in.h arpa/inet.h]) +if test "x$ac_cv_header_netdb_h" = "xyes" && + test "x$ac_cv_header_sys_param_h" = "xyes" && + test "x$ac_cv_header_sys_socket_h" = "xyes" && + test "x$ac_cv_header_netinet_in_h" = "xyes" && + test "x$ac_cv_header_arpa_inet_h" = "xyes"; then + have_network=yes + network_type=Posix +else + have_network=no +fi + +dnl trying to get that socket lib settled in one line +AC_SEARCH_LIBS(gethostbyname, nsl socket) +dnl OK, two lines... Solaris needs -lnsl -lsocket +AC_SEARCH_LIBS(socket, socket) + +AC_CHECK_FUNCS( getaddrinfo, [ have_ipv6=yes ], [ have_ipv6=no ] ) + +APR_CHECK_GETADDRINFO_ADDRCONFIG() + +# Substitutions for the installable mpg123.h header +if test "x$ac_cv_header_stdio_h" = "xyes"; then + INCLUDE_STDIO_H="#include " +else + INCLUDE_STDIO_H="/* #include is not available on this system */" +fi +AC_SUBST(INCLUDE_STDIO_H) + +if test "x$ac_cv_header_stdlib_h" = "xyes"; then + INCLUDE_STDLIB_H="#include " +else + INCLUDE_STDLIB_H="/* #include is not available on this system */" +fi +AC_SUBST(INCLUDE_STDLIB_H) + +if test "x$ac_cv_header_sys_types_h" = "xyes"; then + INCLUDE_SYS_TYPE_H="#include " +else + INCLUDE_SYS_TYPE_H="/* #include is not available on this system */" +fi +AC_SUBST(INCLUDE_SYS_TYPE_H) + + +# Checks for maths libraries. +AC_CHECK_LIB([m], [sqrt]) +AC_CHECK_LIB([mx], [powf]) + +# attempt to make the signal stuff work... also with GENERIC - later +#if test x"$ac_cv_header_sys_signal_h" = xyes; then +# AC_CHECK_FUNCS( sigemptyset sigaddset sigprocmask sigaction ) +# if test x"$ac_cv_func_sigemptyset" = xyes && +# test x"$ac_cv_func_sigaddset" = xyes && +# test x"$ac_cv_func_sigprocmask" = xyes && +# test x"$ac_cv_func_sigaction" = xyes; then +# AC_DEFINE( +#fi + +dnl ############## Choose compiler flags and CPU + +# do not assume gcc here, so no flags by default +ADD_CFLAGS="" +ADD_CPPFLAGS="" +ADD_LDFLAGS="" +LIBS="$LIBS" + +AC_CHECK_HEADER([os2.h], [ADD_CPPFLAGS="$ADD_CPPFLAGS -DOS2"]) + +# If debugging is enabled then make warnings errors +if test x"$debugging" = xenabled; then + ADD_CFLAGS="-g" + # gcc specific... + if test x"$GCC" = xyes; then + ADD_CFLAGS="$ADD_CFLAGS -Wall -fno-strict-aliasing" + if test x"$nagging" = xenabled; then + ADD_CFLAGS="$ADD_CFLAGS -Werror -pedantic -DPLAIN_C89" + fi + fi +fi + +dnl Only try the attribute_align_arg mumbo-jumbo on x86, x86-64 warns/errors out on that attribute. +dnl ...dunno even what about other architectures. +case $host in + i?86-*) + AC_DEFINE(ABI_ALIGN_FUN, 1, [ Define if your architecture wants/needs/can use attribute_align_arg and alignment checks. It is for 32bit x86... ]) + ;; +esac + +s_altivec="synth_altivec dct64_altivec" +s_i386="dct64_i386" +s_i486="$s_i386 synth_i486 dct64_i486" +s_i586="$s_i386 synth_i586" +s_i586d="$s_i386 synth_i586_dither" +s_3dnow="$s_i386 synth_3dnow dct64_3dnow equalizer_3dnow" +s_3dnowext="$s_i386 dct64_3dnowext tabinit_mmx synth_3dnowext" +if test "x$layer3" = "xenabled"; then + s_3dnow="$s_3dnow dct36_3dnow" + s_3dnowext="$s_3dnowext dct36_3dnowext" +fi +s_mmx="$s_i386 dct64_mmx tabinit_mmx synth_mmx" +s_sse="$s_i386 tabinit_mmx dct64_sse dct64_sse_float synth_sse_float synth_stereo_sse_float synth_sse_s32 synth_stereo_sse_s32 " +s_x86_64="dct64_x86_64 dct64_x86_64_float synth_x86_64_float synth_x86_64_s32 synth_stereo_x86_64_float synth_stereo_x86_64_s32" +s_x86multi="getcpuflags" +s_dither="dither" +s_neon="dct64_neon dct64_neon_float synth_neon_float synth_neon_s32 synth_stereo_neon_float synth_stereo_neon_s32" + +# choose optimized 16bit decoder for SSE, quality or fast +# note: supporting deactivation of output formats for these decoders would need more logic here +if test "x$integers" = "xquality"; then + s_sse="$s_sse synth_sse_accurate synth_stereo_sse_accurate" + s_x86_64="$s_x86_64 synth_x86_64_accurate synth_stereo_x86_64_accurate" + s_arm="synth_arm_accurate" + s_neon="$s_neon synth_neon_accurate synth_stereo_neon_accurate" +else + s_sse="$s_sse synth_sse" # no stereo + s_x86_64="$s_x86_64 synth_x86_64 synth_stereo_x86_64" + s_arm="synth_arm" + s_neon="$s_neon synth_neon synth_stereo_neon" +fi + +dnl CPU specific compiler flags and sources +case $cpu_type in + generic) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_GENERIC -DREAL_IS_FLOAT" + more_sources="$s_fpu" + ccalign=no + ;; + generic_dither) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_GENERIC_DITHER -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_dither" + ccalign=no + ;; +dnl Not disabling buffer for float mode... check that this is OK now! + generic_fpu | generic_float) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_GENERIC -DREAL_IS_FLOAT" + more_sources="$s_fpu" + ccalign=no + ;; + generic_nofpu) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_GENERIC -DREAL_IS_FIXED" + more_sources= + ccalign=no + ;; + ppc_nofpu) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_PPC -DREAL_IS_FIXED" + more_sources= + ccalign=no + ;; + arm_nofpu) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_ARM -DREAL_IS_FIXED" + more_sources="$s_arm" + ccalign=no + ;; + altivec) + ADD_CFLAGS="$ADD_CFLAGS -maltivec" + ADD_CPPFLAGS="$ADD_CPPFLAGS -DREAL_IS_FLOAT -DOPT_ALTIVEC" + more_sources="$s_altivec $s_fpu" + AC_MSG_CHECKING([if $CC accepts -faltivec]) + touch conftest.c + if $CC -faltivec -c -o conftest.o conftest.c >/dev/null 2>&1; then + ADD_CFLAGS="$ADD_CFLAGS -faltivec" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + rm -f conftest.o conftest.c + ;; + neon) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_NEON -DREAL_IS_FLOAT" + more_sources="$s_neon $s_fpu" + ;; + i386) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_I386 -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_i386" + ccalign=no + ;; + i386_fpu) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_I386 -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_i386" + ccalign=no + ;; + i386_nofpu) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_I386 -DREAL_IS_FIXED" + more_sources="$s_i386" + ccalign=no + ;; + i486) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_I486 -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_i486" + ccalign=no + ;; + i586) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_I586 -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_i586" + ;; + i586_dither) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_I586_DITHER -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_i586d $s_dither" + ;; + 3dnow) + # legacy 3dnow had the 3dnow paired with i586... + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_MULTI -DOPT_I586 -DOPT_3DNOW -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_i586 $s_3dnow $s_x86multi " + ;; + 3dnow_alone) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_3DNOW -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_3dnow" + ;; + 3dnowext_alone) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_3DNOWEXT -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_3dnowext" + ;; + 3dnowext) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_MULTI -DOPT_3DNOW -DOPT_3DNOWEXT -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_3dnowext $s_3dnow $s_x86multi" + ;; + mmx_alone|mmx) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_MMX -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_mmx" + ;; + sse_alone|sse) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_SSE -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_sse" + ;; + x86|x86_dither) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_MULTI -DOPT_GENERIC -DOPT_GENERIC_DITHER -DOPT_I386 -DOPT_I586 -DOPT_I586_DITHER -DOPT_MMX -DOPT_3DNOW -DOPT_3DNOWEXT -DOPT_SSE -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_i386 $s_i586 $s_i586d $s_mmx $s_3dnow $s_3dnowext $s_sse $s_x86multi $s_dither" + ;; + x86-64) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_X86_64 -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_x86_64" + ;; + x86-64_all|x86-64_dither) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_MULTI -DOPT_X86_64 -DOPT_GENERIC -DOPT_GENERIC_DITHER -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_x86_64 $s_dither" + ;; + *) + AC_MSG_ERROR([Unknown CPU type '$cpu_type']) + ;; +esac + +# Mac OS X specific linker flags +case $cpu_type in + 3dnow|3dnow_alone|3dnowext|3dnowext_alone|mmx|mmx_alone|sse|sse_alone|x86|x86_dither) + case $host in + i386-apple-darwin8*|*-apple-darwin10*) + ADD_LDFLAGS="$ADD_LDFLAGS -Wl,-read_only_relocs,suppress" + ;; + i386-apple-darwin9*) + ADD_CFLAGS="$ADD_CFLAGS -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" + ADD_LDFLAGS="$ADD_LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -Wl,-classic_linker -Wl,-read_only_relocs,suppress" + ;; + esac + ;; +esac + +# Check if we want feature report function. +AC_MSG_CHECKING([if we want feature report function]) +feature_report=enabled +AC_ARG_ENABLE(feature_report, + [ --disable-feature_report Disable feature report function ], + [ + if test "x$enableval" = xno; then + AC_MSG_RESULT([no]) + feature_report=disabled + else + AC_MSG_RESULT([yes]) + fi + ], + [AC_MSG_RESULT([yes])]) + +if test "x$feature_report" = xenabled; then + more_sources="$more_sources feature" +fi + +for i in $more_sources +do + # Echo make sure every file is only once in the list. + echo "$DECODER_OBJ" | $GREP -v -w "$i\.\$(OBJEXT)" > /dev/null && DECODER_OBJ="$DECODER_OBJ $i.\$(OBJEXT)" + echo "$DECODER_LOBJ" | $GREP -v -w "$i\.lo" > /dev/null && DECODER_LOBJ="$DECODER_LOBJ $i.lo" +done + +AC_SUBST(DECODER_OBJ) +AC_SUBST(DECODER_LOBJ) + +dnl Finally insert the code switch for alignment, above cpu selection having possibly changed the setting. +if test x"$ccalign" = xyes; then + AC_DEFINE(CCALIGN, 1, [ Define if __attribute__((aligned(16))) shall be used ]) +fi + + +dnl ############## Output module choice + +# The full list of supported modules to check, first come, first serve. +check_modules="alsa oss coreaudio sndio sun win32 os2 esd jack portaudio pulse sdl nas arts openal dummy" +# The final list. +output_modules= + +check_forced=no +check_failed=no +if test "x$with_audio" != "x"; then + check_modules="`echo $with_audio|tr , ' '` dummy" + echo "Limiting outputs to build according to your preference: $check_modules" + check_forced=yes +fi + +PKG_PROG_PKG_CONFIG([]) + +# Now go through the modules to check and do the chores. +for m in $check_modules +do + case "$m" in + dummy) + AC_MSG_CHECKING([if you are too dumbing dumb for the dummy]) + AC_MSG_RESULT([no]) + output_modules="$output_modules dummy" + HAVE_DUMMY=yes + ;; + oss) + AC_CHECK_HEADERS([sys/soundcard.h linux/soundcard.h machine/soundcard.h]) + if test "x${ac_cv_header_sys_soundcard_h}" = "xyes" \ + -o "x${ac_cv_header_linux_soundcard_h}" = "xyes" \ + -o "x${ac_cv_header_machine_soundcard_h}" = "xyes"; + then + output_modules="$output_modules oss" + HAVE_OSS="yes" + else + check_failed=yes + fi + ;; + alsa) + ALSA_LIBS="-lasound" + # Check for ALSA + AC_CHECK_LIB( [asound], [snd_pcm_open], + [ AC_CHECK_HEADER( [alsa/asoundlib.h], + [ output_modules="$output_modules alsa" HAVE_ALSA="yes"], + [ AC_MSG_WARN([Found ALSA library but NOT header files on your system]) ] ) + ] + ) + if test "x$HAVE_ALSA" != xyes; then + check_failed=yes + fi + ;; + jack) + PKG_CHECK_MODULES(JACK, jack, output_modules="$output_modules jack" HAVE_JACK="yes", HAVE_JACK="no" check_failed=yes) + ;; + pulse) + PKG_CHECK_MODULES(PULSE, libpulse-simple, output_modules="$output_modules pulse" HAVE_PULSE="yes", HAVE_PULSE="no" check_failed=yes) + ;; + esd) + PKG_CHECK_MODULES(ESD, esound, output_modules="$output_modules esd" HAVE_ESD="yes", HAVE_ESD="no" check_failed=yes) + ;; + portaudio) + # Remember: This looks only insane because you chose an insane tab width! + PORTAUDIO_LIBS="-lportaudio" + PORTAUDIO_CFLAGS= + case $host in + *-*-mingw32) + # We tested portaudio with MME + if test "x$HAVE_PORTAUDIO" != "xyes"; then + AC_CHECK_LIB( [portaudio], [Pa_Initialize], + [ AC_CHECK_HEADER( [portaudio.h], + [ output_modules="$output_modules portaudio" HAVE_PORTAUDIO_WINMM="yes" HAVE_PORTAUDIO="yes" ], + [ AC_MSG_WARN([Found PortAudio library but NOT header files on your system]) ] ) + PORTAUDIO_LIBS="$PORTAUDIO_LIBS -lwinmm" + ], + [ HAVE_PORTAUDIO="no"], + [ -lwinmm ] + ) + fi + ;; + *) + AC_CHECK_LIB( [portaudio], [Pa_Initialize], + [ AC_CHECK_HEADER( [portaudio.h], + [ output_modules="$output_modules portaudio" HAVE_PORTAUDIO="yes" ], + [ AC_MSG_WARN([Found PortAudio library but NOT header files on your system]) ] ) + ] + ) + ;; + esac + if test "x$HAVE_PORTAUDIO" != xyes; then + check_failed=yes + else + # See if we have v19 or v18 + AC_CHECK_LIB( [portaudio], [Pa_GetVersion], [:], [AC_DEFINE( [PORTAUDIO18], 1, [Define if portaudio v18 API is wanted.]) ], [$PORTAUDIO_LIBS] ) + fi + ;; + sdl) + PKG_CHECK_MODULES(SDL, sdl, output_modules="$output_modules sdl" HAVE_SDL="yes", HAVE_SDL="no" check_failed=yes) + ;; + nas) + NAS_LIBS=-laudio + AC_CHECK_LIB( [audio], [AuOpenServer], + [ AC_CHECK_HEADER( [audio/audiolib.h], + [ output_modules="$output_modules nas" HAVE_NAS="yes"], + [ AC_MSG_WARN([Found NAS library but NOT header files on your system]) ] ) + ] + ) + if test "x$HAVE_NAS" != xyes; then + check_failed=yes + fi + ;; + win32) + # Check for windows ... and win32 audio + # Does not work... instead just check for header + # AC_CHECK_LIB( [winmm], [waveOutOpen] ) + WIN32_LIBS=-lwinmm + AC_CHECK_HEADERS([windows.h], output_modules="$output_modules win32" HAVE_WIN32=yes, HAVE_WIN32=no check_failed=yes) + ;; + sndio) + SNDIO_LIBS=-lsndio + AC_CHECK_LIB([sndio], [sio_open], + [AC_CHECK_HEADERS([sndio.h], + [output_modules="$output_modules sndio" HAVE_SNDIO="yes"]) + ] + ) + if test "x$HAVE_SNDIO" != xyes; then + check_failed=yes + fi + ;; + sun) + AC_CHECK_HEADERS([sun/audioio.h sys/audioio.h asm/audioio.h sys/audio.h]) + if test "x${ac_cv_header_sun_audioio_h}" = "xyes" \ + -o "x${ac_cv_header_sys_audioio_h}" = "xyes" \ + -o "x${ac_cv_header_asm_audioio_h}" = "xyes"; + then + output_modules="$output_modules sun" + HAVE_SUN="yes" + else + check_failed=yes + fi + ;; + coreaudio) + COREAUDIO_LIBS="-framework AudioToolbox -framework AudioUnit -framework CoreServices" + AC_CHECK_HEADERS([AudioUnit/AudioUnit.h CoreServices/CoreServices.h AudioToolbox/AudioToolbox.h]) + if test "x${ac_cv_header_AudioUnit_AudioUnit_h}" = "xyes" \ + -a "x${ac_cv_header_CoreServices_CoreServices_h}" = "xyes" \ + -a "x${ac_cv_header_AudioToolbox_AudioToolbox_h}" = "xyes"; + then + if test x"$modules" = xdisabled; then + AC_MSG_WARN([Disabling buffer because of directly linked CoreAudio! Use the module if you need the buffer.]) + buffer=disabled + fi + output_modules="$output_modules coreaudio" + HAVE_COREAUDIO="yes" + else + check_failed=yes + fi + ;; + arts) + AC_MSG_CHECKING([for artsc]) + if artsc-config; then + AC_MSG_RESULT([yes]) + output_modules="$output_modules arts" + HAVE_ARTS=yes + ARTS_LIBS=`artsc-config --libs` + ARTS_CFLAGS=`artsc-config --cflags` + else + AC_MSG_RESULT([no]) + check_failed=yes + fi + ;; + openal) + AC_CHECK_HEADERS([OpenAL/al.h OpenAL/alc.h AL/al.h AL/alc.h al.h alc.h]) + if test "x${ac_cv_header_OpenAL_al_h}" = "xyes" \ + -a "x${ac_cv_header_OpenAL_alc_h}" = "xyes"; + then #Mac OS X + output_modules="$output_modules openal" + OPENAL_LIBS="-framework OpenAL" + OPENAL_CFLAGS="-DOPENAL_SUBDIR_OPENAL" + HAVE_OPENAL="yes" + elif test "x${ac_cv_header_AL_al_h}" = "xyes" \ + -a "x${ac_cv_header_AL_alc_h}" = "xyes"; + then #Linux + output_modules="$output_modules openal" + OPENAL_LIBS="-lopenal" + OPENAL_CFLAGS="-DOPENAL_SUBDIR_AL" + HAVE_OPENAL="yes" + elif test "x${ac_cv_header_al_h}" = "xyes" \ + -a "x${ac_cv_header_alc_h}" = "xyes"; + then #Windows? + output_modules="$output_modules openal" + OPENAL_LIBS="-lopenal" + OPENAL_CFLAGS="" + HAVE_OPENAL="yes" + else + check_failed=yes + fi + ;; + os2) + OS2_LIBS="-los2me -lmmpm2 -lsocket" + AC_CHECK_HEADERS([os2.h]) + # os2me.h depends on os2.h + # Yes, that way of coding it is ugly. + if test "x${ac_cv_header_os2_h}" = xyes + then + # We mimick exactly the way how the header will be used. + # It seems to be picky... + AC_CHECK_HEADERS([os2me.h], [], [], [#define INCL_OS2MM +#define INCL_DOS +#define INCL_VIO +#define INCL_KBD +#include +#]) + fi + if test "x${ac_cv_header_os2_h}" = xyes \ + -a "x${ac_cv_header_os2me_h}" = xyes + then + output_modules="$output_modules os2" + HAVE_OS2=yes + else + check_failed=yes + fi + ;; +# from here on only forced tests, untested code + hp) + # What's the deal with that and alib? + UNSUPPORTED_AUDIO=yes + AC_CHECK_HEADER([sys/audio.h], [output_modules="$output_modules hp" HAVE_HP=yes], [check_failed=yes]) + ;; + alib) + UNSUPPORTED_AUDIO=yes + # ALIB_CFLAGS="-I/opt/audio/include" + ALIB_LIBS=-lAlib + # These headers may not be all about audio but they are used. + AC_CHECK_HEADERS([ Alib.h CUlib.h netdb.h netinet/in.h netinet/tcp.h]) + if test "x${ac_cv_header_Alib_h}" = xyes \ + -a "x${ac_cv_header_CUlib_h}" = xyes \ + -a "x${ac_cv_header_netdb_h}" = xyes \ + -a "x${ac_cv_header_netinet_in_h}" = xyes \ + -a "x${ac_cv_header_netinet_tcp_h}" = xyes + then + output_modules="$output_modules alib" + HAVE_ALIB=yes + else + check_failed=yes + fi + ;; + mint) + UNSUPPORTED_AUDIO=yes + AC_CHECK_HEADERS([audios.h], [output_modules="$output_modules mint" HAVE_MINT=yes], [check_failes=yes]) + ;; + aix) + UNSUPPORTED_AUDIO=yes + AC_CHECK_HEADERS([sys/audio.h], [output_modules="$output_modules aix" HAVE_AIX=yes], [check_failed=yes]) + ;; + sgi) + UNSUPPORTED_AUDIO=yes + SGI_LIBS=-laudio + AC_CHECK_HEADER([dmedia/audio.h], [output_modules="$output_modules sgi" HAVE_SGI=yes], [check_failed=yes]) + ;; + *) + AC_MSG_ERROR([Unsupported/-known output '$m' demanded!]) + ;; + esac +done + +if test "x$check_forced" = xyes -a "x$UNSUPPORTED_AUDIO" = xyes; then + AC_MSG_WARN([You requested bulding of an unsupported audio module. Be prepared for happy hacking and please tell us about your experience!]) +fi + +if test "x$check_forced" = xyes -a "x$check_failed" = "xyes"; then + AC_MSG_ERROR([One/some of your requested audio modules failed the test!]) +fi + +# When you extend check_modules, you should extend this: +#for i in alsa oss coreaudio sndio sun win32 esd jack portaudio pulse sdl nas aix alib arts hp os2 sgi mint openal dummy; do echo $i; done | +#perl -ne 'chomp; $big = uc($_); print < /dev/null +if you additionally want to measure the I/O time. + +If you find a player, which claims to be 10 or even more times faster than the +current players: just don't believe it. A factor of 2 MAY BE possible. + + +Thomas's mpg123 decision process +-------------------------------- + +I made some tests back then when I wondered if there is a point in using another "modern" mp3 decoder for my mixing daemon. This was around Dec. 2004 till Feb. 2005 with current versions (0.59r-thorX in the case of mpg123). What follows is a copy of the DECODERS file in the dermixd distribution: + +What decoder should one use? + +----- + MP3 +----- + +mpg123 is the old-fashioned way, uncertain license, may have some problems with extraordinary files (huge id3v2 tags, other specialities?), but fast. Has EQ control; interactive frontend interface (in parts hacked by me...). + +mpg321: is popular these days... interface? speed? + +madplay: is becoming popular these days, handles RVA2 by itself... can't provide an interface nor EQ + + +speed: + +decoding Dirty Guitar with NULL output, pentium-optimized (not more): + +decoder user time/s +mpg123 23 +madplay(hq) 46 +madplay(speed) 34 +mpg321(hq) 62 +mpg321(speed) 49 + + +So, there is still a strong technical point in using mpg123... even when my 366MHz-Laptop can easily handle several decoders at once with either of the programs, every percent cpu usage drags on the battery... and takes the cpu time from the real work + +----- + OGG +----- + +7,9M /tmp/dirty_guitar-q3.ogg +11M /tmp/dirty_guitar-q5.ogg +13M /tmp/dirty_guitar-q6.ogg +15M /tmp/dirty_guitar-q7.ogg +22M /tmp/dirty_guitar-q9.ogg +29M /tmp/dirty_guitar-q10.ogg +14M /tmp/dirty_guitar-std.mp3 +101M /tmp/dirty_guitar.wav + +speed of ogg123: + +quality user time/s +3 31 +5 36 +6 38 +7 39 +10 55 + +So, with similar care as mpg123 concerning some (assembler?) optimization, ogg could well come close to "fast" mp3 decoding. +Does ist sound better, then? + + +A review from the new maintainer +-------------------------------- + +Now it's 2006, 23th of July. Still the same laptop, still the same mp3 file. +I just want to update the number for current mpg123 with the mmx optimization. +I should also see if competition (well, ogg, at least?) improved in the year that passed... but looking only at mp3, that reduces to the question if mpg123 got faster or slower. +Neither on the mpg321 site or the MAD site (ftp dir) did I find any new version. MAD is still 0.15.1b (0.15.2b for madplay), mpg321 still 0.2.10 . +Well, I can look at mplayer's mpg123 spawn called mp3lib that has been taken care for over the time. +But apart from that, will mpg123 stand alone on the field of console mp3 engines that are actively maintained??? +To have at least some twist, I now measured the output of raw data to stdout (to /dev/null) instead of decoding alone. The hardware and largely the software is still the same (now kernel 2.6.11 instead of 2.6.?). +I've only used the "high quality" mad players - the earlier measurements give a hint about the difference to the "speed" variant. + +mpg123-0.60-beta1, underworld_@_dirty_guitar.mp3 + +gcc-3.3.3 +CFLAGS=-O2 -finline-functions -march=pentium2 +built with the new autoconf/make system +machine in X11 running fluxbox, no active load (like a year ago) +measuring second run (with cached file) + +time for -s > /dev/null decode... +pentium: 24s +pentium, MMX: 19s +pentium, MMX, gapless (runtime-disabled): 19s +pentium, MMX, gapless (also runtime-enabled): 19s +mpg321 0.2.10, high quality: 64s +madplay 0.15.2b, high quality: 56s + +With the file length being m:s 9:58 (598s), for mpg123 that makes theoretical realtime cpu 3-4% for the PII-366. +Incidentally, `top` agrees there: it shows 3.0-3.3% CPU usage for the MMX/gapless binary during normal OSS playback. + +I feel unable to benchmark the mp3 playback of mplayer - I don't see an option to make it decode audio as fast as possible (I only know -benhcmark and -noaudio; with esp. the latter not helping me there). diff --git a/deps/mpg123/doc/BUGS b/deps/mpg123/doc/BUGS new file mode 100644 index 0000000..22139c8 --- /dev/null +++ b/deps/mpg123/doc/BUGS @@ -0,0 +1,3 @@ +If you find a bug, please check for and report it in the sourceforge bug tracking system: + + http://sourceforge.net/tracker/?atid=733194&group_id=135704&func=browse diff --git a/deps/mpg123/doc/CONTACT b/deps/mpg123/doc/CONTACT new file mode 100644 index 0000000..3bfc2cd --- /dev/null +++ b/deps/mpg123/doc/CONTACT @@ -0,0 +1,17 @@ +If you have a problem with some mp3 file or with your platform that should be supported by mpg123, please post on the mpg123 user mailing list + + mpg123-users@lists.sourceforge.net + +Any ideas for feature improvements or any other suggestions concerning development may be better placed at + + mpg123-devel@lists.sourceforge.net + +If you don't want to subscribe to these, you can also drop a note to + + maintainer@mpg123.org + +But if you want to subscribe and participate in the open discussion or just browse the mailing list archives, see + + http://sourceforge.net/mail/?group_id=135704 + +(or just http://sourceforge.net/projects/mpg123 and click through). diff --git a/deps/mpg123/doc/LICENSE b/deps/mpg123/doc/LICENSE new file mode 100644 index 0000000..0ede421 --- /dev/null +++ b/deps/mpg123/doc/LICENSE @@ -0,0 +1,22 @@ +GNU says that the license terms go into a file called COPYING. +Go over to COPYING to read the license, then. + +Or... + +You stay a bit with me here and read some not really important text. +You could imagine that there was some important text here, though. +You could also imagine that you were not sitting + in your office / living room / bathroom + in front of one of these evil electronic brains + (you didn't _print_ this file, did you?) + but being at some happy place, far, far away. +You could also imagine being at some unhappy place. +If you indeed are at such an unhappy place, imagine you were sitting + in your office / living room / bathroom + in front of this shiny, though evil, electronic brain. + Reading this pointless text. + Wondering about what you could have achieved in the past moments + if you wouldn't have continued reading this pointless text. + Wondering if anything is worth being achieved at all. + Or if it all is just... +pointless. diff --git a/deps/mpg123/doc/Makefile.am b/deps/mpg123/doc/Makefile.am new file mode 100644 index 0000000..c44558b --- /dev/null +++ b/deps/mpg123/doc/Makefile.am @@ -0,0 +1,32 @@ +## Makefile.am: produce Makefile.in from this + +## copyright by the mpg123 project - free software under the terms of the LGPL 2.1 +## see COPYING and AUTHORS files in distribution or http://mpg123.org +## initially written by Nicholas J. Humfrey + + +EXTRA_DIST = \ + BENCHMARKING \ + BUGS \ + CONTACT \ + PATENTS \ + README.3DNOW \ + README.gain \ + README.remote \ + ROAD_TO_LGPL \ + TODO \ + LICENSE \ + THANKS \ + ACCURACY \ + libmpg123_speed.txt \ + doxyhead.xhtml \ + doxy_examples.c \ + doxygen.conf \ + examples/mpg123_to_wav.c \ + examples/scan.c \ + examples/mpglib.c \ + examples/id3dump.c \ + examples/feedseek.c \ + examples/dump_seekindex.c \ + examples/extract_frames.c \ + examples/Makefile diff --git a/deps/mpg123/doc/Makefile.in b/deps/mpg123/doc/Makefile.in new file mode 100644 index 0000000..55b8a28 --- /dev/null +++ b/deps/mpg123/doc/Makefile.in @@ -0,0 +1,490 @@ +# Makefile.in generated by automake 1.12.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = doc +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in THANKS TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/addrconfig.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/src/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AIX_CFLAGS = @AIX_CFLAGS@ +AIX_LDFLAGS = @AIX_LDFLAGS@ +AIX_LIBS = @AIX_LIBS@ +ALIB_CFLAGS = @ALIB_CFLAGS@ +ALIB_LDFLAGS = @ALIB_LDFLAGS@ +ALIB_LIBS = @ALIB_LIBS@ +ALSA_CFLAGS = @ALSA_CFLAGS@ +ALSA_LDFLAGS = @ALSA_LDFLAGS@ +ALSA_LIBS = @ALSA_LIBS@ +AMTAR = @AMTAR@ +API_VERSION = @API_VERSION@ +AR = @AR@ +ARTS_CFLAGS = @ARTS_CFLAGS@ +ARTS_LDFLAGS = @ARTS_LDFLAGS@ +ARTS_LIBS = @ARTS_LIBS@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COREAUDIO_CFLAGS = @COREAUDIO_CFLAGS@ +COREAUDIO_LDFLAGS = @COREAUDIO_LDFLAGS@ +COREAUDIO_LIBS = @COREAUDIO_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DECODER_LOBJ = @DECODER_LOBJ@ +DECODER_OBJ = @DECODER_OBJ@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMMY_CFLAGS = @DUMMY_CFLAGS@ +DUMMY_LDFLAGS = @DUMMY_LDFLAGS@ +DUMMY_LIBS = @DUMMY_LIBS@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ESD_CFLAGS = @ESD_CFLAGS@ +ESD_LDFLAGS = @ESD_LDFLAGS@ +ESD_LIBS = @ESD_LIBS@ +EXEC_LT_LDFLAGS = @EXEC_LT_LDFLAGS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +HP_CFLAGS = @HP_CFLAGS@ +HP_LDFLAGS = @HP_LDFLAGS@ +HP_LIBS = @HP_LIBS@ +INCLUDE_STDIO_H = @INCLUDE_STDIO_H@ +INCLUDE_STDLIB_H = @INCLUDE_STDLIB_H@ +INCLUDE_SYS_TYPE_H = @INCLUDE_SYS_TYPE_H@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +JACK_CFLAGS = @JACK_CFLAGS@ +JACK_LDFLAGS = @JACK_LDFLAGS@ +JACK_LIBS = @JACK_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LFS_LOBJ = @LFS_LOBJ@ +LIBMPG123_VERSION = @LIBMPG123_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_LDFLAGS = @LT_LDFLAGS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MINT_CFLAGS = @MINT_CFLAGS@ +MINT_LDFLAGS = @MINT_LDFLAGS@ +MINT_LIBS = @MINT_LIBS@ +MKDIR_P = @MKDIR_P@ +MODULE_OBJ = @MODULE_OBJ@ +NAS_CFLAGS = @NAS_CFLAGS@ +NAS_LDFLAGS = @NAS_LDFLAGS@ +NAS_LIBS = @NAS_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENAL_CFLAGS = @OPENAL_CFLAGS@ +OPENAL_LDFLAGS = @OPENAL_LDFLAGS@ +OPENAL_LIBS = @OPENAL_LIBS@ +OS2_CFLAGS = @OS2_CFLAGS@ +OS2_LDFLAGS = @OS2_LDFLAGS@ +OS2_LIBS = @OS2_LIBS@ +OSS_CFLAGS = @OSS_CFLAGS@ +OSS_LDFLAGS = @OSS_LDFLAGS@ +OSS_LIBS = @OSS_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +OUTPUT_CFLAGS = @OUTPUT_CFLAGS@ +OUTPUT_LDFLAGS = @OUTPUT_LDFLAGS@ +OUTPUT_LIBS = @OUTPUT_LIBS@ +OUTPUT_MOD = @OUTPUT_MOD@ +OUTPUT_OBJ = @OUTPUT_OBJ@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PORTAUDIO_CFLAGS = @PORTAUDIO_CFLAGS@ +PORTAUDIO_LDFLAGS = @PORTAUDIO_LDFLAGS@ +PORTAUDIO_LIBS = @PORTAUDIO_LIBS@ +PULSE_CFLAGS = @PULSE_CFLAGS@ +PULSE_LDFLAGS = @PULSE_LDFLAGS@ +PULSE_LIBS = @PULSE_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LDFLAGS = @SDL_LDFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SGI_CFLAGS = @SGI_CFLAGS@ +SGI_LDFLAGS = @SGI_LDFLAGS@ +SGI_LIBS = @SGI_LIBS@ +SHELL = @SHELL@ +SNDIO_CFLAGS = @SNDIO_CFLAGS@ +SNDIO_LDFLAGS = @SNDIO_LDFLAGS@ +SNDIO_LIBS = @SNDIO_LIBS@ +STRIP = @STRIP@ +SUN_CFLAGS = @SUN_CFLAGS@ +SUN_LDFLAGS = @SUN_LDFLAGS@ +SUN_LIBS = @SUN_LIBS@ +VERSION = @VERSION@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_LDFLAGS = @WIN32_LDFLAGS@ +WIN32_LIBS = @WIN32_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = \ + BENCHMARKING \ + BUGS \ + CONTACT \ + PATENTS \ + README.3DNOW \ + README.gain \ + README.remote \ + ROAD_TO_LGPL \ + TODO \ + LICENSE \ + THANKS \ + ACCURACY \ + libmpg123_speed.txt \ + doxyhead.xhtml \ + doxy_examples.c \ + doxygen.conf \ + examples/mpg123_to_wav.c \ + examples/scan.c \ + examples/mpglib.c \ + examples/id3dump.c \ + examples/feedseek.c \ + examples/dump_seekindex.c \ + examples/extract_frames.c \ + examples/Makefile + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu doc/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + +cscope cscopelist: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/deps/mpg123/doc/PATENTS b/deps/mpg123/doc/PATENTS new file mode 100644 index 0000000..7197e09 --- /dev/null +++ b/deps/mpg123/doc/PATENTS @@ -0,0 +1,39 @@ +Some notes about patents and mpg123 by Thomas Orgis +--------------------------------------------------- + +There has been a lot of confusion over mp3 (or more generic mpeg audio) patents and licensing issues due to the patents held by Fraunhofer and marketed by Thomson. +So, yes, there are patents held by Fraunhofer that are claimed to cover mpeg audio technology. There are also claims that they cover any similar technology (like OGG). +You may argue if these patents are valid at all (being illegal software patents, or being preceeded by known scientific publications), but they are internationally accepted by patent authorities and if you want to use mp3 commercially you should check + + http://www.mp3licensing.org + +for the Fraunhofer/Thomson opinion and their terms. + +Since mpg123 is only a mpeg audio player, a good deal of patents that describe the encoding process (the tricky part) will not apply. +Also, statements from the patent holders up to now always allowed the non-commercial distribution of mpeg audio decoders without any fee. +They want you to pay for a license when you want to make money by selling a decoder, though. We don't sell mpg123. +Additionally, one should not forget the fact that the ideas are getting old; the basic (funded by government, btw.) research was somewhen back around the 80s and many patents are going to expire soon, best example in Germany: + +P/DE 35 06 912 Method of transmission of an audio signal using grouping of amplitude values + +Application was 22.02.1986 in Germany (and around Europe in the same time Jan/Feb 1986). +German patents last 20 years... now we have 24.07.2006. Time has come... + +The idea of a patent is to make the inventor open the invention to the public by giving him some safe time to turn this invention into economical benefit. +People using (and improving!) the technology freely after that time is _the_ most important aspect of that idea. + +Oh, I should mention the "core" mp3 patent (from http://gauss.ffii.org/PatentView/EP287578): + +DE 3629434 / EP287578 Digital coding process + +Application date in Germany was 29.08.1986 - that means that in a month from now (remember: 24.07.2006) this patent finds its natural end. + +Then, there are other patents listed on the Fraunhofer/Thomson website that came very late... The one about join stereo coding was aplied for in Feb 1995. Did mpg123 implement that already back then? History is a bit blurry there... +There is a patent applied for in 1997, but probably covering encoding only. Still, even if that weren't the case - the basic decoding functionality of mpg123 didn't change that much after 1997; and they couldn't have patented existing functionality. +In general, few patents seem to cover decoders at all. Of course, with me being no lawyer, that statement is not trustworthy... + +Bottom line is: + +While Fraunhofer/Thomson don't want to charge free software players - they said that a long time ago, the time for they being able to place such charges is expiring or has already expired. One should really think before adding mp3pro/surround support to mpg123, though, since there are for sure more recent patents for that. + +And don't forget: The progress bar is covered by a patent, too. diff --git a/deps/mpg123/doc/README.3DNOW b/deps/mpg123/doc/README.3DNOW new file mode 100644 index 0000000..98aae5a --- /dev/null +++ b/deps/mpg123/doc/README.3DNOW @@ -0,0 +1,56 @@ +************************************************************************ +* 3DNow! support by KIMURA Takuhiro * +* * +* (http://hannah.ipc.miyakyo-u.ac.jp/kim/) * +* Syuuhei Kashiyama * +* (http://user.ecc.u-tokyo.ac.jp/~g810370/)* +************************************************************************ + +----------------------------- +What's new in patch for 0.59r +----------------------------- +- 3DNow! optimized decode routine (decode_3dnow.s,dct36_3dnow.s ; + these code based Syuuhei Kashiyama's 3DNow! patch for mpg123-0.59o) +- 3DNow! optimized equalizer (equalizer_3dnow.s ; do_equalizer() only) +- target "linux-3dnow-alsa" "linux-3dnow-esd" added (untested) +- automatic detect 3DNow! support CPU from CPUFLAGS (getcpuflags.s) + (i.e. use floating-pointer decode routine if your CPU isn't support + 3DNow! or MMX instructions) + +------------- +Added options +------------- +"--test-3dnow" : display result of autodetect and exit +"--force-3dnow" : force use of 3DNow! optimized decoder + (it will cause SIGILL if your CPU isn't support 3DNow! or MMX + instructions) +"--no-3dnow" : force use of floating-pointer decoder + +----------- +How to make +----------- +[1] To make 3DNow! optimized mpg123,you need binutils-2.9.1.0.15 or later. + You can find the most recent binutils (2.9.1.0.25 until 23.Jun.1999) at + - kernel.org (and mirrors) : /pub/linux/devel/gcc/ + - http://hannah.ipc.miyakyo-u.ac.jp/kim/Linux/binutils/ + (Takuhiro's local copy) + etc. +[2] Type "make linux-3dnow" (OSS) + or "make linux-3dnow-alsa" (ALSA). +[3] Enjoy! + +------------------ +Precompiled binary +------------------ +You can get precompiled binary of mpg123 (with 3DNow! support) from + http://hannah.ipc.miyakyo-u.ac.jp/kim/Linux/mpg123/ + +---------- +References +---------- +Useful sources of information on optimizing 3DNow! code include: +- AMD 3DNow! Technology Manual (Publication #21928) + English: http://www.amd.com/K6/k6docs/pdf/21928d.pdf + (Japanese: http://www.amd.com/japan/K6/k6docs/j21928c.pdf) +- AMD-K6-2 Processor Code Optimization Application Note (Publication #21924) + English: http://www.amd.com/K6/k6docs/pdf/21924b.pdf diff --git a/deps/mpg123/doc/README.gain b/deps/mpg123/doc/README.gain new file mode 100644 index 0000000..e12fc5a --- /dev/null +++ b/deps/mpg123/doc/README.gain @@ -0,0 +1,171 @@ +Thomas Orgis on RVA, Gain and Pain + + +Ok, so I'm going to add RVA/ReplayGain support... the problem there is not to read these valus from ID3 or Lame, not even to do the adjustment itself. +The problem is more to figure out how to interpret the dB values one gets there. + +Main players in the field of relative volume adjustment / soft gain (without modifying actual audio data): + +http://www1.cs.columbia.edu/~cvaill/normalize/ + ...writing RVA2 ID3v2tags for dB offset to user target amplitude, default being -12dB(FS) +http://www.replaygain.org/ + ...store the difference to reference of 83dB(SPL) ... somewhere + +Both calculate some running RMS and do statistics with this - the main difference is the potentially different target level. +Also both know two basic types of adjustment: Per track to make all tracks sound at the same sevel (track / radio) and the one with default meaning to keep the loudness relations over albums (batch / audiophile). + +dB can mean many things and also the raw value of a PCM sample doesn't equal directly to loudness (power of a wave != amplitude). + +So that says the ReplayGain about applying the adjustment: + + scale=10.^(replay_gain/20); + +luckily, this is the same that I worked out on my own for the normalize RVA values in my mixplayer script: + + return 10**($s/20); + +I'll take that interpretaion of dB -> linear scale factor for samples for granted, then. + +The replay_gain value is meant in the standard to represent the offset to 83dB(SPL - depending on your amplifier...), having in mind that actual most wanted average playback level should be 83dB(SPL) (defined by movie ppl as the loudness of a -20dB(FS) signal, leaving room for louder stuff). +But then there is the proposal to add 6dB preamp for pop music - am I judging music types with mpg123?? +These 6dB are in fact the real world since lots of programs use 89dB(SPL...) as reference. +Thus, lame since 3.95.1 (according to MADplay's Rob Leslie who discussed with Lame ppl, verified in 3.96 source) stores the adjustment to 89dB. +To make that all sound the same, one should add 6bB to lame <3.95.1 ReplayGain values and use later ones verbatim - achieving 89dB everytime, whatever that may mean in reality out of my speakers (my Marantz' volume knob doesn't have a scale at all - be it dB or percent;-). + +A funny aspect of this 6dB issue is to tell lame 3.95.1 from lame 3.95 + +As for normalize... the desired playback level is essentially undefined. Ignoring that and realizing that mpg123 has no way to determine real world sound power anyway, one has to just take the provided dB values and apply with the formula above. +The user is responsible for providing files with his desired settings... for that reason I also won't follow the ReplayGain demand/suggestion that a player should apply an average of gains of previous tracks if the current one lacks a setting. + +So, well. Considering that ReplayGain (at least the radio one) being stored by current lame on encoding, I suppose that if there are RVA2 values in ID3v2 tags, these were added by a conscious user act and are overriding the ReplayGain ones. + +I already read ReplayGain entries in Lame tag... should add ID3v2 parsing. Especially since the lame tag is ambignous because of the 6dB issue... I cannot distinguish 3.95.1 from 3.95 by reading the tag - frick! +But wait... 6dB? + +[thomas@thorvas /home/thomas-data/mpg123-neu/lame-3.96.1]$ frontend/lame --cbr -T /mnt/knecht_mp3/music/covenant/2006_skyshaper/03-happy_man.mp3 ../testfiles/happy_man_lame-3.96.1.mp3 +ID3v2 found. Be aware that the ID3 tag is currently lost when transcoding. +LAME version 3.96.1 (http://lame.sourceforge.net/) +Using polyphase lowpass filter, transition band: 17249 Hz - 17782 Hz +Encoding /mnt/knecht_mp3/music/covenant/2006_skyshaper/03-happy_man.mp3 + to ../testfiles/happy_man_lame-3.96.1.mp3 +Encoding as 44.1 kHz 128 kbps j-stereo MPEG-1 Layer III (11x) qval=3 + Frame | CPU time/estim | REAL time/estim | play/CPU | ETA + 6371/6374 (100%)| 1:41/ 1:41| 1:47/ 1:47| 1.6353x| 0:00 +average: 128.0 kbps LR: 754 (11.83%) MS: 5620 (88.17%) + +Writing LAME Tag...done +ReplayGain: -7.4dB +revmethod = 1 +encoder padding: 1728 + +[thomas@thorvas /home/thomas-data/mpg123-neu/lame-3.95.1]$ frontend/lame --cbr -T /mnt/knecht_mp3/music/covenant/2006_skyshaper/03-happy_man.mp3 ../testfiles/happy_man.mp3 +ID3v2 found. Be aware that the ID3 tag is currently lost when transcoding. +LAME version 3.95 (http://www.mp3dev.org/) +Using polyphase lowpass filter, transition band: 17249 Hz - 17782 Hz +Encoding /mnt/knecht_mp3/music/covenant/2006_skyshaper/03-happy_man.mp3 + to ../testfiles/happy_man.mp3 +Encoding as 44.1 kHz 128 kbps j-stereo MPEG-1 Layer III (11x) qval=3 + Frame | CPU time/estim | REAL time/estim | play/CPU | ETA + 6371/6374 (100%)| 1:36/ 1:36| 1:48/ 1:48| 1.7289x| 0:00 +average: 128.0 kbps LR: 759 (11.91%) MS: 5615 (88.09%) + +Writing LAME Tag...done +ReplayGain: -7.4dB + +[thomas@thorvas /home/thomas-data/mpg123-neu/lame-3.95]$ frontend/lame --cbr -T /mnt/knecht_mp3/music/covenant/2006_skyshaper/03-happy_man.mp3 ../testfiles/happy_man_lame-3.95.mp3 +ID3v2 found. Be aware that the ID3 tag is currently lost when transcoding. +LAME version 3.95 (http://www.mp3dev.org/) +Using polyphase lowpass filter, transition band: 17249 Hz - 17782 Hz +Encoding /mnt/knecht_mp3/music/covenant/2006_skyshaper/03-happy_man.mp3 + to ../testfiles/happy_man_lame-3.95.mp3 +Encoding as 44.1 kHz 128 kbps j-stereo MPEG-1 Layer III (11x) qval=3 + Frame | CPU time/estim | REAL time/estim | play/CPU | ETA + 6371/6374 (100%)| 1:37/ 1:37| 1:43/ 1:43| 1.7041x| 0:00 +average: 128.0 kbps LR: 759 (11.91%) MS: 5615 (88.09%) + +Writing LAME Tag...done +ReplayGain: -13.4dB + + +Together with the gain values read from tags: + +3.96.1: -1.0dB (claimed -7.4dB) +3.95: -1.0dB (claimed -7.4dB) +3.95: -0.6dB (claimed -13.4dB) + +So, the difference of 6dB shows in the values lame prints on the command line... but the lame tags only have 0.4dB difference and are much lower anyway - do I parse them correctly? + +Opinion of normalize of these files: -2dB. Great. I guess the -1 is what lame really meant, then... + + +Storage places +============== + +Points 1, 2 and 4 implemented to some respect. + + +1. Lame/Info tag + +supposedly in format according to the proposed standard - but I yet have to verify if Lame really does this. +see http://gabriel.mp3-tech.org/mp3infotag.html + + +2. ID3v2 RVA2 frame(s) + +Normalize does that. Rare is the software reading that. +I've never seen those frames since id3v2 -l doesn't know them. + + +3. APE tags + +Gah, another Tag format. Foobar2000 uses this as default. +It's getting real-hy messy folks + + +4. Per convention in ID3 tags + +Well, I myself once used the ID3v1 comment field for storing the mix rva value (textual) ... but that is a tad too unspecific. +I then also used user-defined ID3v2 comments like that: + +[thomas@thorvas /home/thomas-data/mpg123-neu/svn/trunk]$ id3v2 -l /mnt/knecht_mp3/music/underworld/second_toughest_in_the_infants/02-banstyle_sappys_curry.mp3 +id3v1 tag info for /mnt/knecht_mp3/music/underworld/second_toughest_in_the_infants/02-banstyle_sappys_curry.mp3: +Title : banstyle sappys curry Artist: underworld +Album : second toughest in the infants Year: 0 , Genre: Other (12) +Comment: Created by Grip Track: 2 +id3v2 tag info for /mnt/knecht_mp3/music/underworld/second_toughest_in_the_infants/02-banstyle_sappys_curry.mp3: +TYER (Year): 0 +TRCK (Track number/Position in set): 2 +COMM (Comments): (ID3v1 Comment)[XXX]: Created by Grip +TCON (Content type): Other (12) +TPE1 (Lead performer(s)/Soloist(s)): underworld +TALB (Album/Movie/Show title): second toughest in the infants +TIT2 (Title/songname/content description): banstyle sappys curry +COMM (Comments): (RVA)[]: 4.3291 +COMM (Comments): (RVA_ALBUM)[]: 3.666101 + +That still doesn't look like a bad Idea to me. Not bothering with byte ordering and whatnot. Just atof(id3v2_comm_rva). +One could still add dB, though. + +Another convention is (rockbox mailinglist, not checked myself) used by Foobar: + +TXXX (User defined text information): (replaygain_track_gain): -7.17 dB +TXXX (User defined text information): (replaygain_track_peak): 1.057122 +TXXX (User defined text information): (replaygain_album_gain): -6.53 dB +TXXX (User defined text information): (replaygain_album_peak): 1.107456 + +So what are custom comment fields for when there are also custom text fields? They look very similar to me. + + +5. Leave the haunted music file alone and store metadata externally. + +That's the only sane way for stuff like album art... and it's the way I do it in my music archive. the wrapper script reads the adjustment values and then sets an adjusted volume. +That's fine for my mixing daemon that manupulates the pcm data anyway, but it would be nice to have this functionality in the minimalist console mode. too. +Even more since it can be done without additional cpu power during decoding (well, one-time set up of the decode tables is needed for every track) similar to the equalizer. +I could simply start with text files with lines like + +RVA_MIX: 3.4dB +RVA_ALBUM: 1.7dB + +Prob here is that the effort to open and parse that extra file may hinder gapless decoding between tracks... +Well, one could parse all metadata files for a list of tracks before playback starts. +But all this won't work for streams via stdin (hm, one could argue if the stream needs RVA at all). diff --git a/deps/mpg123/doc/README.remote b/deps/mpg123/doc/README.remote new file mode 100644 index 0000000..f16932a --- /dev/null +++ b/deps/mpg123/doc/README.remote @@ -0,0 +1,218 @@ +Control interface to generic frontends + +The generic remote interface allows frontends to easily control +mpg123 by commands through stdin/stdout. To start the generic +remote interface, start mpg123 with parameter -R. + +In case of a frontend that starts mpg123 with the -s option to read the audio from stdout, the --remote-err option is automatically activated to send responses to stderr so that stdout stays clean for audio. + +(Still the case?) +As an example it's used by IRMP3, a tool that allows you to +control mpg123 with a standard infrared remote control. See +http://www.fasta.fh-dortmund.de/users/andy/irmp3/ for more +information. + +You can also specify --fifo to create a named pipe at and listen on that for commands instead stdin. +That way, you can deliberately control mpg123 by echoing into the named pipe from any terminal / program. +The command respones are still sent to standard out or standard error (depending on -s or --remote-err switches). + + +COMMAND CODES +------------- + +You can get this info via the control command "help". + +HELP/H: command listing (LONG/SHORT forms), command case insensitve + +LOAD/L : load and start playing resource + +LOADPAUSED/LP : load but do not start playing resource + +LOADLIST : load a playlist from given , and display its entries, optionally load and play one of these specificed by the integer (<0: just list, 0: play last track, >0:play track with that position in list) + +PAUSE/P: pause playback + +STOP/S: stop playback (closes file) + +JUMP/J |<+offset>|<-offset>|<[+|-]seconds>s: jump to mpeg frame or change position by offset, same in seconds if number followed by "s" + +VOLUME/V : set volume in % (0..100...); float value + +RVA off|(mix|radio)|(album|audiophile): set rva mode + +EQ/E : set equalizer value for frequency band 0 to 31 on channel 1 (left) or 2 (right) or 3 (both) + +EQFILE : load EQ settings from a file + +SHOWEQ: show all equalizer settings (as lines in a SHOWEQ block (like TAG)) + +SEEK/K |<+offset>|<-offset>: jump to output sample position or change position by offset + +SCAN: scan through the file, building seek index + +SAMPLE: print out the sample position and total number of samples + +SEQ : simple eq setting... + +PITCH <[+|-]value>: adjust playback speed (+0.01 is 1 % faster) + +SILENCE: be silent during playback (meaning silence in text form) + +STATE: Print auxilliary state info in several lines (just try it to see what info is there). + +TAG/T: Print all available (ID3) tag info, for ID3v2 that gives output of all collected text fields, using the ID3v2.3/4 4-character names. + The output is multiple lines, begin marked by "@T {", end by "@T }". + ID3v1 data is like in the @I info lines (see below), just with "@T" in front. + An ID3v2 data field is introduced via ([ ... ] means optional): + @T ID3v2.[ [lang()] desc()]: + The lines of data follow with "=" prefixed: + @T = +meaning of the @S stream info: + +S +The @I lines after loading a track give some ID3 info, the format: + @I ID3:artist album year comment genretext + where artist,album and comment are exactly 30 characters each, year is 4 characters, genre text unspecified. + You will encounter "@I ID3.genre:" and "@I ID3.track:". + Then, there is an excerpt of ID3v2 info in the structure + @I ID3v2.title:Blabla bla Bla + for every line of the "title" data field. Likewise for other fields (author, album, etc). + + +RESPONSE CODES +-------------- + +Note: mpg123 returns errors on stderr, so your frontend should + look not only at stdout but also at stderr for responses. + It is a good idea to use --remote-err and just look at stderr. + +@R MPG123 (ThOr) v7 + Startup version message. Everything after MPG123 is auxilliary information about behaviour and command support, ID3v2 tag support is new in v3. + +@I ID3: + Status message after loading a song (ID3 song info) + a = title (exactly 30 chars) + b = artist (exactly 30 chars) + c = album (exactly 30 chars) + d = year (exactly 4 chars) + e = comment (exactly 30 chars) + f = genre (string) + +@I ID3.genre: +@I ID3.track: + Optional lines with additional ID3v1 info (if present): Genre ID and track number in set. + +@I ID3v2.title: + After loading a track with ID3v2 info, such lines occur for every line of the "title" data field and likewise for other fields (author, album, etc). + +@I + Status message after loading a song (no ID3 song info) + a = filename without path and extension + +@I LISTENTRY : + printout of playlists loaded with LOADLIST + +@S ... + Stream info at beginning of playback, meaning + S + +@S + Status message after loading a song (stream info) + a = mpeg type (string) + b = layer (int) + c = sampling frequency (int) + d = mode (string) + e = mode extension (int) + f = framesize (int) + g = stereo (int) + h = copyright (int) + i = error protection (int) + j = emphasis (int) + k = bitrate (int) + l = extension (int) + +@F + Status message during playing (frame info) + a = framecount (int) + b = frames left this song (int) + c = seconds (float) + d = seconds left (float) + +@P + Playing status + a = 0: playing stopped + a = 1: playing paused + a = 2: playing unpaused + +@E + An error occured + Errors may be also reported by mpg123 through + stderr (without @E) + a = error message (string) + +@J + Jumped to frame n. + +@RVA + Switched to specified RVA mode. + +@V % + Set volume to specified value (float, percent). + +@ : : + Set equalizer value z for band y of channel x. + +@bass: mid: treble: + Set simple equalizer control for bass, mid, treble. + +@T + The output is multiple lines, begin marked by "@T {", end by "@T }". + ID3v1 data is like in the @I info lines, just with "@T" in front. + An ID3v2 data field is introduced via ([ ... ] means optional): + @T ID3v2.[ [lang()] desc()]: + The lines of data follow with "=" prefixed: + @T = + + +EQUALIZER CONTROL (History) +--------------------------- + +WARNING: The interpretation of the command arguments changed. The channel is either 1 or 2 or 3 (left, right, both). +It used to be 0 or 1 for left or right but the change slipped through during libmpg123 work and now it is a fact. +Sorry. + +Cold Feet Audio Patch for MPG123 + +10.07.2002 + +This is a dirty little hack to enable the equalizer in mpg123's +generic_control interface. It works like this, there are two +different channels on the equalizer and 32 frequencys. + +The hack just enables mpg123's built in equalizer to run real-time. +We haven't built in any capability to save the eq, you're frontend +will have to handle that part, and init the eq on the startup of +mpg123. + +K, it works like this: + +#./mpg123 -R - <---- This command will start mpg123 in 'frontend' mode. + +If you want to send it some eq values you'd send it: +eq X Y V[ENTER] + +X = The channel. It can be either 0 or 1. I haven't put any error checking + in, so it probably wouldn't be a good idea to go out of bounds. (integer) +Y = This is the frequency, it can be 0 to 31. 0 being closer to treble and + 31 being closer to bass. (integer) +V = The raw value of your equalizer setting. I've found that the values work + best between 0.00 and 3.00. When mpg123 starts up, all of them are set + to 1.00. + +OK, have fun! If you have any questions or found some bugs, please contact +nutcase@dtmf.org + +Thanks, +nut + +Note by Thomas Orgis: The contact appears to be dead. diff --git a/deps/mpg123/doc/ROAD_TO_LGPL b/deps/mpg123/doc/ROAD_TO_LGPL new file mode 100644 index 0000000..c2d2313 --- /dev/null +++ b/deps/mpg123/doc/ROAD_TO_LGPL @@ -0,0 +1,270 @@ +The License of mpg123 +===================== + + by Thomas Orgis + +1. Story: The Odyssey, The Decision +----------------------------------- + +This is the 17th of July in the year 2006, after half a year of preparation and the contributor email campaign running for over 3 months, I'm going to draw a conclusion about the licensing of the mpg123 project. + + +The license conditions of mpg123 have been subject to dispute and rejection by parts of the free software world in the past... +We want to have it straight now. +Michael doesn't have much freetime to maintain the code and bother with requests by companies wanting to use mpglib. +So, he already decided to place mpglib under LGPL and mpg123 under GPL in the past. +Now, after I applied for taking over maintainership we decided on placing as much code of the whole project as possible under LGPL to ease future code migration and merging between mpg123 and mpglib. + +That decision was followed by a lot of work to track down as many contributors to both Michael's development tree and my -thor one as possible to ask them for explicit LGPL support statements. +I wrote to every Name/eMail address I could track down (including internet search for new addresses), regardless of the question if there indeed is some code left by that person. +I asked them to utter any problem they may have with LGPL license as well as contacting me if there are _no_ issues. + +Of course, without having to ask again, supporters of LGPL are the initial author and the two current maintainers: + + Michael Hipp + Nicholas J. Humfrey + Thomas Orgis + +Also, new stuff was included with explicit LGPL permission from + + Adrian Bacon + Romain Dolbeau + Guillaume Outters + +Plus there is stuff pending with permission from + + Zuxy Meng + +Now for the folks having made suggestions and contributions over the years... +In the first round starting in March 2006 I wrote the initial mail to anyone I could get. That resulted in some positive responses - examples: + + "I don't remember what I did, but LGPL is fine by me." + + "No problem for me." + + "Any code I may have contributed to the mpg123 project at any time in the +past are hereby licensed to you under the GNU Lesser General Public" + + "it's fine with me if mpg123 goes LGPL. + However, my contribution to mpg123 was very minor, and I'm not even sure if + any of my code is still in the current version." + +A good number of eMail addresses is just broken (years have passed...) and another good number of addresses are either totally unknown or not known to be good or bad since no response (not even bounce - thanks, spam!) came back in over 3 months. + +Some statistics for the first run: 86 total , 15 positive, 37 broken email, 34 unknown + +Positive: + Andreas Neuhaus + Chris Butler + Colin Watson + Daniel Kobras + Daniel O'Connor + Daniel Skarda + Erik B. Andersen + Helge Deller + Juergen Schoew + Martin Denn + Munechika SUMIKAWA + Oliver Fromme + Petr Stehlik + Robert Bihlmeyer + Samuel Audet + Shane Wegner + Stefan Bieschewski + Steven Schultz + Tillmann Steinbrecher + Tomas Oegren + Tommi Virtanen + +Then, an investigation of the code revealed a core of people having actually left traces in the code. +Some more effort was put in tracking them down, with the partial success of having found some new, working email addresses and thus having some more positive responses . +But also, it showed that the main number of people is not reachable anymore. + +Creators (of a whole file, driver...): 16 total, 5 positive, 2 broken email, 9 unknown + +Positive: + Andreas Neuhaus + Juergen Schoew + Oliver Fromme + Petr Stehlik + Samuel Audet + +Modders: 7 total, 1 positive, 2 broken mail, 4 unknown + +Positive: + Tomas Oegren + + +That shows two things: + + 1. It's impossible to get a response from everyone having contributed in some way. + 2. Everyone who I reached supports the license change to LGPL + + +So, for the sake of getting a reasonable step forward, I'm going to close the case. +There are three categories of code: + +1. written by Michael or some other contributor who explicitly supports LGPL + + Clear case: LGPL + +2. contributed years ago without license notice + + The grounded assumption of can be made that the contributor accepted Michael's conditions, esp. the part about the software being available without cost. + Furthermore they gave the code into Michael's hands or placed patches in the internet without any claims concerning commercial uses - wich were not covered by the old COPYING file. + Based on the assumption of acceptance for the mpg123 COPYING file and the included rule of Michael's decision for any further use, this code is to be placed under LGPL by Michael's decision. + +3. contributed with notice + + Some code includes a note about it being GPL. Well, one has to respect that. + + +That results in the bulk of mpg123 being LGPL and possibly some parts GPL only. + + +2. The Inventory +---------------- + +I will now examine the files of the mpg123 svn trunk as of 17.07.2006 with their respective legal status: + +Stuff added by current maintainers, thus being LGPL: + + scripts/debugdef.pl + AUTHORS + autogen.sh + configure.ac + Makefile.am + MakeLegacy.sh + src/audio_jack.c + src/audio_libao.c + src/Makefile.am + src/audio_alsa09.c + src/config.h.legacy + src/debug.h + src/layer3.h + +Non-Code files from Michael, maintainers or just trivial content (safely LGPL, then): + + BENCHMARKING + BUGS + CHANGES + equalize.dat + INSTALL + mpg123.1 + COPYING + TODO + README + README.3DNOW + README.cfa + README.new + README.remote + README.thor + README.WIN32 + test.pl + BENCHMARKING.thor + CONTACT + +sources under LGPLv2.1: + +by Michael: + + audio.c + audio_dummy.c + audio.h + audio_hp.c + audio_oss.c + audio_sun.c + common.c + common.h + dct64.c + dct64_i386.c + decode_2to1.c + decode_4to1.c + decode.c + decode_i386.c + decode_ntom.c + Makefile.legacy + equalizer.c + getbits.c + getbits.h + huffman.h + l2tables.h + layer1.c + layer2.c + layer3.c + mpg123.c + mpg123.h + readers.c + system.c + tabinit.c + term.c + term.h + +by contributors: + + audio_aix.c: Juergen Schoew, Tomas Oegren, Niklas Edmundsson + audio_alib.c: Erwan Ducroquet + audio_esd.c: Eric B. Mitchell + audio_macosx.c: Guillaume Outters + audio_mint.c: Petr Stehlik + audio_nas.c: Martin Denn + audio_os2.c: Samuel Audet + audio_sgi.c: Thomas Woerner + audio_win32.c: Tony Million + buffer.c: Oliver Fromme + buffer.h: Daniel Kobras / Oliver Fromme + control_generic.c: Andreas Neuhaus, Michael Hipp, Thomas Orgis + dct36_3dnow.s: Syuuhei Kashiyama + dct64_3dnow.s: Syuuhei Kashiyama + dct64_altivec.c: Romain Dolbeau + dct64_i486.c: Fabrice Bellard + decode_3dnow.s: Syuuhei Kashiyama + decode_i486.c: Fabrice Bellard + decode_i586_dither.s: Stefan Bieschewski, Adrian Bacon + decode_i586.s: Stefan Bieschewski + decode_MMX.s: higway + dct64_MMX.s: higway + tabinit_MMX.s: higway + equalizer_3dnow.s: KIMURA Takuhiro + genre.h: Shane Wegner + getcpuflags.s: KIMURA Takuhiro + getlopt.c: Oliver Fromme + getlopt.h: Oliver Fromme + httpget.c: Oliver Fromme + wav.c: Samuel Audet + xfermem.c: Oliver Fromme + xfermem.h: Oliver Fromme + Makefile.win32: Michael Hipp / Tony Million + +GPLv2 + + audio_alsa.c: by Anders Semb Hermansen, Jaroslav Kysela, Ville Syrjala + + +To be removed from distribution and thus not licensed in any special way: + +precompiled/ +tools/ + +The mpglib source is not part of the core mpg123 distribution anymore - it's written by Michael, it's LGPL, it shall become a real library with own distribution and be married to mpg123 again. + + +3. Conclusion +------------- + +The decoder core Michael's work and under LGPL without question. +Oliver Fromme is more of a co-author than "just" a project contributor, but he explicitly agreed to LGPL anyway. +So, the core functionality is really safe without doubt. + +Contributors added mainly output drivers (perhaps coming from some freely available reference implementation) and CPU optimizations. +Having explicit permission from a good deal of major contributors, the LGPL is quite comfortable here, too. +I won't hide that there are explicit statements missing for MMX and 3DNow! optimizations (and the i486 opt, for that matter) due to unreachable authors. +But I feel safe to make it LGPL there, too, because of the argument of them having given the code to Michael to incorporate it into mpg123 - without any own terms, implying that they agree to Michael's terms. + +There is one file left that carries an explicit GPL (_no_ LGPL) statement: the old alsa output. This file won't work on current Linux systems, anyway. +Alsa is available through libao. There will probably be a new alsa output. +So, even that one GPL exception may vanish in future, but I'll keep it for now as there may be someone who still has an alsa installation for that it works. + +For now that means mpg123 is LGPL with the exception of one file that is GPL only. + +End. diff --git a/deps/mpg123/doc/THANKS b/deps/mpg123/doc/THANKS new file mode 100644 index 0000000..b01b668 --- /dev/null +++ b/deps/mpg123/doc/THANKS @@ -0,0 +1,13 @@ +There are authors who write code and there are people who point us to what code to write, show us our errors and generally are trying hard to compensate the time the developers spent coding and not actually using the software. +These people are very valuable, indeed - let's thank our + +Testers (alphapetical): + +- Gabor Z. Papp +- "Gates Fan" +- JonY +- Serge Simon and the R.O.M. 106.5 FM Team (http://www.rom.lu/) + who motivated the --loop and --timeout modes and furthermore supported the maintainer with a donation on sf.net and a real bottle of wine from Luxembourg! +- Willy Tarreau + +Heck, let's thank all of you who contributed bug reports, suggestions... those who took mpg123 source and compiled it on uncommon platforms. diff --git a/deps/mpg123/doc/TODO b/deps/mpg123/doc/TODO new file mode 100644 index 0000000..63653a7 --- /dev/null +++ b/deps/mpg123/doc/TODO @@ -0,0 +1,63 @@ +We badly need: + - header reorganization (lots of stuff don't belong to mpg123.h) + - integer type safety - STOP using ints where size_t or at least long would be appropriate (expecially stream readers) + - sprintf -> snprintf (maybe with switch to support ancient libc; or replacement by us) + - rewrite httpget.c; that thing has been a can of bugs for years and I understand why when I look at it (way too many cooks) + - really parse ID3V2 tags instead of skipping; done for RVA values... using the string info (just?) needs some Unicode/Locale handling + - check support for fixed point arithmentic; generic_nofpu seems wo work generally, but resampling does not sound nice + +From Nicholas: + - Seperate out MPEG Audio decoder (only) into seperate library + - Allow choice of audio output at runtime, rather than compile time + - Choose processor optimization at runtime, rather than compile time? + +From Michael (some time after/around pre-0.59s): + +- add CRC check. +- add 'free format stream' support. +- optimize layer2.c: + step_two: fraction as pointer .. + process first channel 0 than channel 1 + copy channel 0 to channel 1 for: i >= jsbound +- better frame reader .. especially for layer 3 - DONE by a good deal by Thomas +- MPEG system stream decoder +- check again layer1 !! (Layer-1 support not heavily tested ..) + Problems with Layer1 fl7 reference stream +- Write a special (optimized) 'single channel' decode. +- optimized dct64 for down sampling modes +- native audio support for AIX and DEC +- update manpage +- optimizations for downsampling modes on layer2 and layer1 + +MORE TODO: (partially done) +--------------------------- + +A few notes on how mpg123 tries to select a 'good' +audio encoding and frequency. (not full implemented yet!!) + +- mpg123 tries to set the settings you specify on the command line + in the order of its appearence (exclusiv .. no fallback then) + (-r , --mono, --stereo, --8bit, etc ) + +- after this, mpg123 tries to set + 1. the number of channels (or fallback to mono if stereo isn't possible) + 2. the audioformat to 16 bit (or fallback to 8bit) + 3. the "best" frequency: (in this order) + - the exact stream frequency or fallback to + - 2:1 frequency or fallback to + - 4:1 frequency or try the + - nearest frequency lower than the frequency of your stream + mpg123 automagically converts the rate. + +So, if you think (or even know), that your hardware supports a higher +frequency only with eg. mono,8bit you must force mpg123 to play mono +and 8bit. ("--8bit -m") etc.... + +If you wanna a constant format eg to output the data to stdout you +must explicit force it with eg: '-r 44100 --stereo' +Else the format will be the format of the mpeg stream. + + + + + diff --git a/deps/mpg123/doc/doxy_examples.c b/deps/mpg123/doc/doxy_examples.c new file mode 100644 index 0000000..6fc851b --- /dev/null +++ b/deps/mpg123/doc/doxy_examples.c @@ -0,0 +1,21 @@ +/** \defgroup mpg123_examples example programs using libmpg123 + @{ */ + +/** \file mpg123_to_wav.c A simple MPEG audio to WAV converter using libmpg123 (read) and libsndfile (write). + ...an excersize on two simple APIs. */ + +/** \file mpglib.c Example program mimicking the old mpglib test program. + It takes an MPEG bitstream from standard input and writes raw audio to standard output. + This is an use case of the mpg123_decode() in and out function in the feeder mode, quite close to classic mpglib usage and thus a template to convert from that to libmpg123. +*/ + +/** \file scan.c Example program that examines the exact length of an MPEG file. + It opens a list of files and does mpg123_scan() on each and reporting the mpg123_length() before and after that. */ + +/** \file id3dump.c Parse ID3 info and print to standard output. */ + +/** \file extract_frames.c Parse stream and extract only the valid MPEG frames to standard output. */ + +/** \file feedseek.c Fuzzy feeder seeking. */ + +/* @} */ diff --git a/deps/mpg123/doc/doxygen.conf b/deps/mpg123/doc/doxygen.conf new file mode 100644 index 0000000..74616c7 --- /dev/null +++ b/deps/mpg123/doc/doxygen.conf @@ -0,0 +1,41 @@ + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# + +PROJECT_NAME = "libmpg123" +OUTPUT_DIRECTORY = . +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +FULL_PATH_NAMES = NO + +INPUT = doxy_examples.c examples/mpg123_to_wav.c examples/mpglib.c examples/scan.c examples/feedseek.c examples/id3dump.c ../src/libmpg123/mpg123.h +OPTIMIZE_OUTPUT_FOR_C = YES +EXTRACT_ALL = NO +HIDE_UNDOC_MEMBERS = NO +QUIET = YES +WARNINGS = YES +SOURCE_BROWSER = YES + +GENERATE_HTML = YES +HTML_OUTPUT = html +DISABLE_INDEX = YES +SORT_MEMBER_DOCS = NO +SORT_BRIEF_DOCS = NO +ENUM_VALUES_PER_LINE = 2 + + +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = YES +EXPAND_ONLY_PREDEF = YES +PREDEFINED = EXPORT= + +GENERATE_HTML = YES +GENERATE_LATEX = NO +GENERATE_RTF = NO +GENERATE_MAN = YES +MAN_LINKS = YES +GENERATE_XML = NO + +HTML_HEADER = doxyhead.xhtml +HTML_FILE_EXTENSION = .shtml diff --git a/deps/mpg123/doc/doxyhead.xhtml b/deps/mpg123/doc/doxyhead.xhtml new file mode 100644 index 0000000..87186f3 --- /dev/null +++ b/deps/mpg123/doc/doxyhead.xhtml @@ -0,0 +1,12 @@ + +$title + + + + + diff --git a/deps/mpg123/doc/examples/Makefile b/deps/mpg123/doc/examples/Makefile new file mode 100644 index 0000000..52f1b07 --- /dev/null +++ b/deps/mpg123/doc/examples/Makefile @@ -0,0 +1,48 @@ +targets = feedseek mpg123_to_wav mpg123_to_wav_replaced_io scan id3dump mpglib dump_seekindex extract_frames + +all: $(targets) + +# On largefile-aware systems you might want to use these instead: +#MPG123_CFLAGS := $(shell pkg-config --cflags libmpg123_64) +#MPG123_LDFLAGS := $(shell pkg-config --libs libmpg123_64) +# This works on sane setups where off_t is off_t, and just that. +ifeq ($(MPG123_PREFIX),) + MPG123_CFLAGS := $(shell pkg-config --cflags libmpg123) + MPG123_LDFLAGS := $(shell pkg-config --libs libmpg123) +else # Yeah, that's with GNU/Linux in mind, at least GNU ld ... + MPG123_CFLAGS := -I$(MPG123_PREFIX)/include + MPG123_LDFLAGS := -L$(MPG123_PREFIX)/lib -Wl,-rpath $(MPG123_PREFIX)/lib -lmpg123 +endif +SND_CFLAGS := $(shell pkg-config --cflags sndfile) +SND_LDFLAGS := $(shell pkg-config --libs sndfile) + +# Oder of libs not that important here... +compile = $(CC) $(CPPFLAGS) $(CFLAGS) $(MPG123_CFLAGS) +linkflags = $(MPG123_LDFLAGS) $(LDFLAGS) + +mpg123_to_wav: mpg123_to_wav.c + $(compile) -o mpg123_to_wav mpg123_to_wav.c $(SND_CFLAGS) $(SND_LDFLAGS) $(linkflags) + +mpg123_to_wav_replaced_io: mpg123_to_wav_replaced_io.c + $(compile) -o $@ $< $(SND_CFLAGS) $(SND_LDFLAGS) $(linkflags) + +feedseek: feedseek.c + $(compile) -o feedseek feedseek.c $(linkflags) + +scan: scan.c + $(compile) -o scan scan.c $(linkflags) + +id3dump:id3dump.c + $(compile) -o id3dump id3dump.c $(linkflags) + +dump_seekindex: dump_seekindex.c + $(compile) -o dump_seekindex dump_seekindex.c $(linkflags) + +mpglib: mpglib.c + $(compile) -o mpglib mpglib.c $(linkflags) + +extract_frames: extract_frames.c + $(compile) -o $@ $< $(linkflags) + +clean: + rm -vf $(targets) diff --git a/deps/mpg123/doc/examples/dump_seekindex.c b/deps/mpg123/doc/examples/dump_seekindex.c new file mode 100644 index 0000000..9b6dae0 --- /dev/null +++ b/deps/mpg123/doc/examples/dump_seekindex.c @@ -0,0 +1,41 @@ +/* + dump_seekindex: Scan a mpeg file and dump its seek index. + + copyright 2010 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Patrick Dehne +*/ + +#include +#include + +int main(int argc, char **argv) +{ + mpg123_handle *m; + off_t* offsets; + off_t step; + size_t fill, i; + + if(argc != 2) + { + fprintf(stderr, "\nI will dump the frame index of an MPEG audio file.\n"); + fprintf(stderr, "\nUsage: %s \n\n", argv[0]); + return -1; + } + mpg123_init(); + m = mpg123_new(NULL, NULL); + mpg123_param(m, MPG123_RESYNC_LIMIT, -1, 0); + mpg123_param(m, MPG123_INDEX_SIZE, -1, 0); + mpg123_open(m, argv[1]); + mpg123_scan(m); + + mpg123_index(m, &offsets, &step, &fill); + for(i=0; i + +/* unistd.h is not available under MSVC, + io.h defines the read and write functions */ +#ifndef _MSC_VER +#include +#else +#include +#endif + +#include + +int do_work(mpg123_handle *m); + +int main(int argc, char **argv) +{ + int ret = 0; + mpg123_handle *m; + + mpg123_init(); + m = mpg123_new(NULL, &ret); + + if(m == NULL) + { + fprintf(stderr, "Cannot create handle: %s", mpg123_plain_strerror(ret)); + } + else + { + fprintf(stderr, "I'll take your dirty MPEG audio from standard input and will write the extrated pure MPEG data to stadard output.\n"); + if(argc > 1 && strcmp(argv[1], "--noinfo") == 0) + { + fprintf(stderr, "Enabling parsing/consuming of the Info frame so that it will not appear in output.\n"); + ret = mpg123_param(m, MPG123_REMOVE_FLAGS, MPG123_IGNORE_INFOFRAME, 0.); + } + else + { + fprintf(stderr, "If you'd have given --noinfo as argument, I would omit a LAME/Xing info frame.\n"); + ret = mpg123_param(m, MPG123_ADD_FLAGS, MPG123_IGNORE_INFOFRAME, 0.); + } + if(ret == 0) ret = do_work(m); + + if(ret != 0) fprintf(stderr, "Some error occured: %s\n", mpg123_strerror(m)); + + + mpg123_delete(m); /* Closes, too. */ + } + mpg123_exit(); + + return ret; +} + +int do_work(mpg123_handle *m) +{ + int ret; + size_t count = 0; + ret = mpg123_open_fd(m, STDIN_FILENO); + if(ret != MPG123_OK) return ret; + + while( (ret = mpg123_framebyframe_next(m)) == MPG123_OK || ret == MPG123_NEW_FORMAT ) + { + unsigned long header; + unsigned char *bodydata; + size_t bodybytes; + if(mpg123_framedata(m, &header, &bodydata, &bodybytes) == MPG123_OK) + { + /* Need to extract the 4 header bytes from the native storage in the correct order. */ + unsigned char hbuf[4]; + int i; + for(i=0; i<4; ++i) hbuf[i] = (unsigned char) ((header >> ((3-i)*8)) & 0xff); + + /* Now write out both header and data, fire and forget. */ + write(STDOUT_FILENO, hbuf, 4); + write(STDOUT_FILENO, bodydata, bodybytes); + fprintf(stderr, "%zu: header 0x%08x, %zu body bytes\n", ++count, header, bodybytes); + } + } + + if(ret != MPG123_DONE) + fprintf(stderr, "Some error occured (non-fatal?): %s\n", mpg123_strerror(m)); + + fprintf(stderr, "Done with %zu MPEG frames.\n", count); + + return 0; +} diff --git a/deps/mpg123/doc/examples/feedseek.c b/deps/mpg123/doc/examples/feedseek.c new file mode 100644 index 0000000..8f68d17 --- /dev/null +++ b/deps/mpg123/doc/examples/feedseek.c @@ -0,0 +1,238 @@ +/* + feedseek: test program for libmpg123, showing how to use fuzzy seeking in feeder mode + copyright 2008 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org +*/ + +#include +#include + +#define INBUFF 16384 * 2 * 2 +#define WAVE_FORMAT_PCM 0x0001 +#define WAVE_FORMAT_IEEE_FLOAT 0x0003 + +FILE *out; +size_t totaloffset, dataoffset; +long rate; +int channels, enc; +unsigned short bitspersample, wavformat; + +// write wav header +void initwav() +{ + unsigned int tmp32 = 0; + unsigned short tmp16 = 0; + + fwrite("RIFF", 1, 4, out); + totaloffset = ftell(out); + + fwrite(&tmp32, 1, 4, out); // total size + fwrite("WAVE", 1, 4, out); + fwrite("fmt ", 1, 4, out); + tmp32 = 16; + fwrite(&tmp32, 1, 4, out); // format length + tmp16 = wavformat; + fwrite(&tmp16, 1, 2, out); // format + tmp16 = channels; + fwrite(&tmp16, 1, 2, out); // channels + tmp32 = rate; + fwrite(&tmp32, 1, 4, out); // sample rate + tmp32 = rate * bitspersample/8 * channels; + fwrite(&tmp32, 1, 4, out); // bytes / second + tmp16 = bitspersample/8 * channels; // float 16 or signed int 16 + fwrite(&tmp16, 1, 2, out); // block align + tmp16 = bitspersample; + fwrite(&tmp16, 1, 2, out); // bits per sample + fwrite("data ", 1, 4, out); + tmp32 = 0; + dataoffset = ftell(out); + fwrite(&tmp32, 1, 4, out); // data length +} + +// rewrite wav header with final length infos +void closewav() +{ + unsigned int tmp32 = 0; + unsigned short tmp16 = 0; + + long total = ftell(out); + fseek(out, totaloffset, SEEK_SET); + tmp32 = total - (totaloffset + 4); + fwrite(&tmp32, 1, 4, out); + fseek(out, dataoffset, SEEK_SET); + tmp32 = total - (dataoffset + 4); + + fwrite(&tmp32, 1, 4, out); +} + +// determine correct wav format and bits per sample +// from mpg123 enc value +void initwavformat() +{ + if(enc & MPG123_ENC_FLOAT_64) + { + bitspersample = 64; + wavformat = WAVE_FORMAT_IEEE_FLOAT; + } + else if(enc & MPG123_ENC_FLOAT_32) + { + bitspersample = 32; + wavformat = WAVE_FORMAT_IEEE_FLOAT; + } + else if(enc & MPG123_ENC_16) + { + bitspersample = 16; + wavformat = WAVE_FORMAT_PCM; + } + else + { + bitspersample = 8; + wavformat = WAVE_FORMAT_PCM; + } +} + +int main(int argc, char **argv) +{ + unsigned char buf[INBUFF]; + unsigned char *audio; + FILE *in; + mpg123_handle *m; + int ret, state; + size_t inc, outc; + off_t len, num; + size_t bytes; + off_t inoffset; + inc = outc = 0; + + if(argc < 3) + { + fprintf(stderr,"Please supply in and out filenames\n"); + return -1; + } + + mpg123_init(); + + m = mpg123_new(NULL, &ret); + if(m == NULL) + { + fprintf(stderr,"Unable to create mpg123 handle: %s\n", mpg123_plain_strerror(ret)); + return -1; + } + + mpg123_param(m, MPG123_VERBOSE, 2, 0); + + ret = mpg123_param(m, MPG123_FLAGS, MPG123_FUZZY | MPG123_SEEKBUFFER | MPG123_GAPLESS, 0); + if(ret != MPG123_OK) + { + fprintf(stderr,"Unable to set library options: %s\n", mpg123_plain_strerror(ret)); + return -1; + } + + // Let the seek index auto-grow and contain an entry for every frame + ret = mpg123_param(m, MPG123_INDEX_SIZE, -1, 0); + if(ret != MPG123_OK) + { + fprintf(stderr,"Unable to set index size: %s\n", mpg123_plain_strerror(ret)); + return -1; + } + + ret = mpg123_format_none(m); + if(ret != MPG123_OK) + { + fprintf(stderr,"Unable to disable all output formats: %s\n", mpg123_plain_strerror(ret)); + return -1; + } + + // Use float output + ret = mpg123_format(m, 44100, MPG123_MONO | MPG123_STEREO, MPG123_ENC_FLOAT_32); + if(ret != MPG123_OK) + { + fprintf(stderr,"Unable to set float output formats: %s\n", mpg123_plain_strerror(ret)); + return -1; + } + + ret = mpg123_open_feed(m); + if(ret != MPG123_OK) + { + fprintf(stderr,"Unable open feed: %s\n", mpg123_plain_strerror(ret)); + return -1; + } + + in = fopen(argv[1], "rb"); + if(in == NULL) + { + fprintf(stderr,"Unable to open input file %s\n", argv[1]); + return -1; + } + + out = fopen(argv[2], "wb"); + if(out == NULL) + { + fclose(in); + fprintf(stderr,"Unable to open output file %s\n", argv[2]); + return -1; + } + + fprintf(stderr, "Seeking...\n"); + /* That condition is tricky... parentheses are crucial... */ + while((ret = mpg123_feedseek(m, 95000, SEEK_SET, &inoffset)) == MPG123_NEED_MORE) + { + len = fread(buf, sizeof(unsigned char), INBUFF, in); + if(len <= 0) + break; + inc += len; + + state = mpg123_feed(m, buf, len); + if(state == MPG123_ERR) + { + fprintf(stderr, "Error: %s", mpg123_strerror(m)); + return -1; + } + } + if(ret == MPG123_ERR) + { + fprintf(stderr, "Feedseek failed: %s\n", mpg123_strerror(m)); + return -1; + } + + fseek(in, inoffset, SEEK_SET); + + fprintf(stderr, "Starting decode...\n"); + while(1) + { + len = fread(buf, sizeof(unsigned char), INBUFF, in); + if(len <= 0) + break; + inc += len; + ret = mpg123_feed(m, buf, len); + + while(ret != MPG123_ERR && ret != MPG123_NEED_MORE) + { + ret = mpg123_decode_frame(m, &num, &audio, &bytes); + if(ret == MPG123_NEW_FORMAT) + { + mpg123_getformat(m, &rate, &channels, &enc); + initwavformat(); + initwav(); + fprintf(stderr, "New format: %li Hz, %i channels, encoding value %i\n", rate, channels, enc); + } + fwrite(audio, sizeof(unsigned char), bytes, out); + outc += bytes; + } + + if(ret == MPG123_ERR) + { + fprintf(stderr, "Error: %s", mpg123_strerror(m)); + break; + } + } + + fprintf(stderr, "Finished\n", (unsigned long)inc, (unsigned long)outc); + + closewav(); + fclose(out); + fclose(in); + mpg123_delete(m); + mpg123_exit(); + return 0; +} diff --git a/deps/mpg123/doc/examples/id3dump.c b/deps/mpg123/doc/examples/id3dump.c new file mode 100644 index 0000000..649e331 --- /dev/null +++ b/deps/mpg123/doc/examples/id3dump.c @@ -0,0 +1,178 @@ +/* + id3dump: Print ID3 tags of files, scanned using libmpg123. + + copyright 2007 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Thomas Orgis +*/ + +#include "mpg123.h" +#include +#include "stdio.h" +#include "sys/types.h" + +/* Helper for v1 printing, get these strings their zero byte. */ +void safe_print(char* name, char *data, size_t size) +{ + char safe[31]; + if(size>30) return; + + memcpy(safe, data, size); + safe[size] = 0; + printf("%s: %s\n", name, safe); +} + +/* Print out ID3v1 info. */ +void print_v1(mpg123_id3v1 *v1) +{ + safe_print("Title", v1->title, sizeof(v1->title)); + safe_print("Artist", v1->artist, sizeof(v1->artist)); + safe_print("Album", v1->album, sizeof(v1->album)); + safe_print("Year", v1->year, sizeof(v1->year)); + safe_print("Comment", v1->comment, sizeof(v1->comment)); + printf("Genre: %i", v1->genre); +} + +/* Split up a number of lines separated by \n, \r, both or just zero byte + and print out each line with specified prefix. */ +void print_lines(const char* prefix, mpg123_string *inlines) +{ + size_t i; + int hadcr = 0, hadlf = 0; + char *lines = NULL; + char *line = NULL; + size_t len = 0; + + if(inlines != NULL && inlines->fill) + { + lines = inlines->p; + len = inlines->fill; + } + else return; + + line = lines; + for(i=0; ititle); + print_lines("Artist: ", v2->artist); + print_lines("Album: ", v2->album); + print_lines("Year: ", v2->year); + print_lines("Comment: ", v2->comment); + print_lines("Genre: ", v2->genre); +} + +/* Print out all stored ID3v2 fields with their 4-character IDs. */ +void print_raw_v2(mpg123_id3v2 *v2) +{ + size_t i; + for(i=0; itexts; ++i) + { + char id[5]; + char lang[4]; + memcpy(id, v2->text[i].id, 4); + id[4] = 0; + memcpy(lang, v2->text[i].lang, 3); + lang[3] = 0; + if(v2->text[i].description.fill) + printf("%s language(%s) description(%s)\n", id, lang, v2->text[i].description.p); + else printf("%s language(%s)\n", id, lang); + + print_lines(" ", &v2->text[i].text); + } + for(i=0; iextras; ++i) + { + char id[5]; + memcpy(id, v2->extra[i].id, 4); + id[4] = 0; + printf( "%s description(%s)\n", + id, + v2->extra[i].description.fill ? v2->extra[i].description.p : "" ); + print_lines(" ", &v2->extra[i].text); + } + for(i=0; icomments; ++i) + { + char id[5]; + char lang[4]; + memcpy(id, v2->comment_list[i].id, 4); + id[4] = 0; + memcpy(lang, v2->comment_list[i].lang, 3); + lang[3] = 0; + printf( "%s description(%s) language(%s): \n", + id, + v2->comment_list[i].description.fill ? v2->comment_list[i].description.p : "", + lang ); + print_lines(" ", &v2->comment_list[i].text); + } +} + +int main(int argc, char **argv) +{ + int i; + mpg123_handle* m; + if(argc < 2) + { + fprintf(stderr, "\nI will print some ID3 tag fields of MPEG audio files.\n"); + fprintf(stderr, "\nUsage: %s \n\n", argv[0]); + return -1; + } + mpg123_init(); + m = mpg123_new(NULL, NULL); + + for(i=1; i < argc; ++i) + { + mpg123_id3v1 *v1; + mpg123_id3v2 *v2; + int meta; + if(mpg123_open(m, argv[i]) != MPG123_OK) + { + fprintf(stderr, "Cannot open %s: %s\n", argv[i], mpg123_strerror(m)); + continue; + } + mpg123_scan(m); + meta = mpg123_meta_check(m); + if(meta & MPG123_ID3 && mpg123_id3(m, &v1, &v2) == MPG123_OK) + { + printf("Tag data on %s:\n", argv[i]); + printf("\n==== ID3v1 ====\n"); + if(v1 != NULL) print_v1(v1); + + printf("\n==== ID3v2 ====\n"); + if(v2 != NULL) print_v2(v2); + + printf("\n==== ID3v2 Raw frames ====\n"); + if(v2 != NULL) print_raw_v2(v2); + } + else printf("Nothing found for %s.\n", argv[i]); + + mpg123_close(m); + } + mpg123_delete(m); + mpg123_exit(); + return 0; +} diff --git a/deps/mpg123/doc/examples/mpg123_to_wav.c b/deps/mpg123/doc/examples/mpg123_to_wav.c new file mode 100644 index 0000000..9193875 --- /dev/null +++ b/deps/mpg123/doc/examples/mpg123_to_wav.c @@ -0,0 +1,118 @@ +/* + mpg123_to_wav.c + + copyright 2007 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Nicholas Humfrey +*/ + +#include +#include +#include +#include + + +void usage() +{ + printf("Usage: mpg123_to_wav [s16|f32 [ ]]\n"); + exit(99); +} + +void cleanup(mpg123_handle *mh) +{ + /* It's really to late for error checks here;-) */ + mpg123_close(mh); + mpg123_delete(mh); + mpg123_exit(); +} + +int main(int argc, char *argv[]) +{ + SNDFILE* sndfile = NULL; + SF_INFO sfinfo; + mpg123_handle *mh = NULL; + unsigned char* buffer = NULL; + size_t buffer_size = 0; + size_t done = 0; + int channels = 0, encoding = 0; + long rate = 0; + int err = MPG123_OK; + off_t samples = 0; + + if (argc<3) usage(); + printf( "Input file: %s\n", argv[1]); + printf( "Output file: %s\n", argv[2]); + + err = mpg123_init(); + if(err != MPG123_OK || (mh = mpg123_new(NULL, &err)) == NULL) + { + fprintf(stderr, "Basic setup goes wrong: %s", mpg123_plain_strerror(err)); + cleanup(mh); + return -1; + } + + /* Simple hack to enable floating point output. */ + if(argc >= 4 && !strcmp(argv[3], "f32")) mpg123_param(mh, MPG123_ADD_FLAGS, MPG123_FORCE_FLOAT, 0.); + + /* Let mpg123 work with the file, that excludes MPG123_NEED_MORE messages. */ + if( mpg123_open(mh, argv[1]) != MPG123_OK + /* Peek into track and get first output format. */ + || mpg123_getformat(mh, &rate, &channels, &encoding) != MPG123_OK ) + { + fprintf( stderr, "Trouble with mpg123: %s\n", mpg123_strerror(mh) ); + cleanup(mh); + return -1; + } + + if(encoding != MPG123_ENC_SIGNED_16 && encoding != MPG123_ENC_FLOAT_32) + { /* Signed 16 is the default output format anyways; it would actually by only different if we forced it. + So this check is here just for this explanation. */ + cleanup(mh); + fprintf(stderr, "Bad encoding: 0x%x!\n", encoding); + return -2; + } + /* Ensure that this output format will not change (it could, when we allow it). */ + mpg123_format_none(mh); + mpg123_format(mh, rate, channels, encoding); + + bzero(&sfinfo, sizeof(sfinfo) ); + sfinfo.samplerate = rate; + sfinfo.channels = channels; + sfinfo.format = SF_FORMAT_WAV|(encoding == MPG123_ENC_SIGNED_16 ? SF_FORMAT_PCM_16 : SF_FORMAT_FLOAT); + printf("Creating WAV with %i channels and %liHz.\n", channels, rate); + + sndfile = sf_open(argv[2], SFM_WRITE, &sfinfo); + if(sndfile == NULL){ fprintf(stderr, "Cannot open output file!\n"); cleanup(mh); return -2; } + + /* Buffer could be almost any size here, mpg123_outblock() is just some recommendation. + Important, especially for sndfile writing, is that the size is a multiple of sample size. */ + buffer_size = argc >= 5 ? atol(argv[4]) : mpg123_outblock(mh); + buffer = malloc( buffer_size ); + + do + { + sf_count_t more_samples; + err = mpg123_read( mh, buffer, buffer_size, &done ); + more_samples = encoding == MPG123_ENC_SIGNED_16 + ? sf_write_short(sndfile, (short*)buffer, done/sizeof(short)) + : sf_write_float(sndfile, (float*)buffer, done/sizeof(float)); + if(more_samples < 0 || more_samples*mpg123_encsize(encoding) != done) + { + fprintf(stderr, "Warning: Written number of samples does not match the byte count we got from libmpg123: %li != %li\n", (long)(more_samples*mpg123_encsize(encoding)), (long)done); + } + samples += more_samples; + /* We are not in feeder mode, so MPG123_OK, MPG123_ERR and MPG123_NEW_FORMAT are the only possibilities. + We do not handle a new format, MPG123_DONE is the end... so abort on anything not MPG123_OK. */ + } while (err==MPG123_OK); + + if(err != MPG123_DONE) + fprintf( stderr, "Warning: Decoding ended prematurely because: %s\n", + err == MPG123_ERR ? mpg123_strerror(mh) : mpg123_plain_strerror(err) ); + + sf_close( sndfile ); + + samples /= channels; + printf("%li samples written.\n", (long)samples); + cleanup(mh); + return 0; +} diff --git a/deps/mpg123/doc/examples/mpglib.c b/deps/mpg123/doc/examples/mpglib.c new file mode 100644 index 0000000..4ee1a1d --- /dev/null +++ b/deps/mpg123/doc/examples/mpglib.c @@ -0,0 +1,92 @@ +/* + mpglib: test program for libmpg123, in the style of the legacy mpglib test program + + copyright 2007 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Thomas Orgis +*/ + +#include + +/* unistd.h is not available under MSVC, + io.h defines the read and write functions */ +#ifndef _MSC_VER +#include +#else +#include +#endif + +#ifdef _WIN32 +#include +#endif + +#include + +#define INBUFF 16384 +#define OUTBUFF 32768 + +int main(int argc, char **argv) +{ + size_t size; + unsigned char buf[INBUFF]; /* input buffer */ + unsigned char out[OUTBUFF]; /* output buffer */ + ssize_t len; + int ret; + size_t in = 0, outc = 0; + mpg123_handle *m; + +#ifdef _WIN32 +_setmode(_fileno(stdin),_O_BINARY); +_setmode(_fileno(stdout),_O_BINARY); +#endif + + mpg123_init(); + m = mpg123_new(argc > 1 ? argv[1] : NULL, &ret); + if(m == NULL) + { + fprintf(stderr,"Unable to create mpg123 handle: %s\n", mpg123_plain_strerror(ret)); + return -1; + } + mpg123_param(m, MPG123_VERBOSE, 2, 0); /* Brabble a bit about the parsing/decoding. */ + + /* Now mpg123 is being prepared for feeding. The main loop will read chunks from stdin and feed them to mpg123; + then take decoded data as available to write to stdout. */ + mpg123_open_feed(m); + if(m == NULL) return -1; + + fprintf(stderr, "Feed me some MPEG audio to stdin, I will decode to stdout.\n"); + while(1) /* Read and write until everything is through. */ + { + len = read(0,buf,INBUFF); + if(len <= 0) + { + fprintf(stderr, "input data end\n"); + break; + } + in += len; + /* Feed input chunk and get first chunk of decoded audio. */ + ret = mpg123_decode(m,buf,len,out,OUTBUFF,&size); + if(ret == MPG123_NEW_FORMAT) + { + long rate; + int channels, enc; + mpg123_getformat(m, &rate, &channels, &enc); + fprintf(stderr, "New format: %li Hz, %i channels, encoding value %i\n", rate, channels, enc); + } + write(1,out,size); + outc += size; + while(ret != MPG123_ERR && ret != MPG123_NEED_MORE) + { /* Get all decoded audio that is available now before feeding more input. */ + ret = mpg123_decode(m,NULL,0,out,OUTBUFF,&size); + write(1,out,size); + outc += size; + } + if(ret == MPG123_ERR){ fprintf(stderr, "some error: %s", mpg123_strerror(m)); break; } + } + fprintf(stderr, "%lu bytes in, %lu bytes out\n", (unsigned long)in, (unsigned long)outc); + + /* Done decoding, now just clean up and leave. */ + mpg123_delete(m); + mpg123_exit(); + return 0; +} diff --git a/deps/mpg123/doc/examples/scan.c b/deps/mpg123/doc/examples/scan.c new file mode 100644 index 0000000..df9b999 --- /dev/null +++ b/deps/mpg123/doc/examples/scan.c @@ -0,0 +1,47 @@ +/* + scan: Estimate length (sample count) of a mpeg file and compare to length from exact scan. + + copyright 2007 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Thomas Orgis +*/ + +/* Note the lack of error checking here. + While it would be nicer to inform the user about troubles, libmpg123 is designed _not_ to bite you on operations with invalid handles , etc. + You just jet invalid results on invalid operations... */ + +#include +#include + +int main(int argc, char **argv) +{ + mpg123_handle *m; + int i; + if(argc < 2) + { + fprintf(stderr, "\nI will give you the estimated and exact sample lengths of MPEG audio files.\n"); + fprintf(stderr, "\nUsage: %s \n\n", argv[0]); + return -1; + } + mpg123_init(); + m = mpg123_new(NULL, NULL); + mpg123_param(m, MPG123_RESYNC_LIMIT, -1, 0); /* New in library version 0.0.1 . */ + for(i = 1; i < argc; ++i) + { + off_t a, b; + + mpg123_open(m, argv[i]); + + a = mpg123_length(m); + mpg123_scan(m); + b = mpg123_length(m); + + mpg123_close(m); + + printf("File %i: estimated %li vs. scanned %li\n", i, (long)a, (long)b); + } + + mpg123_delete(m); + mpg123_exit(); + return 0; +} diff --git a/deps/mpg123/doc/libmpg123_speed.txt b/deps/mpg123/doc/libmpg123_speed.txt new file mode 100644 index 0000000..1d48648 --- /dev/null +++ b/deps/mpg123/doc/libmpg123_speed.txt @@ -0,0 +1,84 @@ +This is historic... one should make a new investigation. +What I can say that a quick test of pre0.59s versus 1.7.3 with generic decoder on my x86-64 GNU/Linux box is not able to call a winner (or looser, for that matter). +Though, 1.8.0 will make the new libmpg123 a winner, because there is new optimization code going on! + +The move to libmpg123 means some more code separation / interfacing and especially the move of any local static variables into the mpg123_handle to make multiple stream handling possible. +That may very well have an impact on performance of the mpg123 decoder. +I made some tests, even using gcc's -pg option and gprof, with mixed result: SSE and MMX on my Thinkpad X31 are slower, especially the asm synth funtion, while the generic code is fine. +On the other hand, on a K6-3+ using the same gcc version 4.1.2, the library based mpg123 is _faster_ for MMX and 3DNowExt. +Epecially the mmx synth is faster... while the 3DNowExt synth is slower, too (it's the same code as SSE synth, just calling different dct64) - but speedups in other regions still make 3DNowExt of the library mpg123 more efficient. + +What I can clearly say is that dropping the multi-cpu support via ./configure --with-cpu does help in for both monolithic and library mpg123, but that is no wonder as it removes indirection. +The main point stays, though: On my Thinkpad the library is slow, on the K6-3+ it's fast. + +What's the point to get here? I am not sure. We're depending on the compiler optimization (btw: Intel Compiler doesn't change the relation for the Thinkpad; not tested on the K6). +I guess that for my Thinkpad another gcc version could invert the picture again... +Also, I am not sure how far I should trust the gprof analysis... but it can be right; even when there is no apparent cause for the speed difference in the code itself, it could be some effect of cache and memory access. +Some reordering of instructions and data... for sure that happened. + +I'll need further numbers to conclude anything about the (positive/negative) impact my code changes have. + +OK, ran the test of trunk against branches/mpg123lib on my media box with AMD Geode (AthlonXP, actually): + +thomas@kiste:~$ for i in mpg123-lib mpg123-trunk; do for cpu in mmx 3dnowext sse; do echo $i $cpu; time $i/src/mpg123 --cpu $cpu -q -t /thorma/var/music/metallica/ride_the_lightning/*.mp3; done; done +mpg123-lib mmx + +real 0m25.949s +user 0m25.395s +sys 0m0.534s +mpg123-lib 3dnowext + +real 0m25.442s +user 0m24.863s +sys 0m0.558s +mpg123-lib sse + +real 0m25.794s +user 0m25.214s +sys 0m0.562s +mpg123-trunk mmx + +real 0m26.650s +user 0m26.004s +sys 0m0.626s +mpg123-trunk 3dnowext + +real 0m25.886s +user 0m25.262s +sys 0m0.600s +mpg123-trunk sse + +real 0m25.695s +user 0m25.136s +sys 0m0.539s +thomas@kiste:~$ for i in mpg123-lib mpg123-trunk; do for cpu in 3dnow; do echo $i $cpu; time $i/src/mpg123 --cpu $cpu -q -t /thorma/var/music/metallica/ride_the_lightning/*.mp3; done; done +mpg123-lib 3dnow + +real 0m33.011s +user 0m32.365s +sys 0m0.621s +mpg123-trunk 3dnow + +real 0m32.830s +user 0m32.192s +sys 0m0.619s + + +You can't really make a decision there. It's tight. +What worries me a bit is the total loose of 3DNow against MMX - should it be that drastic? +Well, it's higher quality, at least. + + +Addendum: The game on an K6-3+ + +On mpg123 < 1.8.0, he 3DNowExt decoder used to be slower than the 3DNow decoder. Only recently it has been observed, that the simplification of the runtime decoder choice code sped up that one significantly, towards the same performance level as the single-decoder build of mpg123 1.6.4 (-with-cpu=3dnowext_alone having broken build in later versions:-/). +We are talking about a difference of 20% here... there is something special about the K6-3+ that makes is that sensitive to how the function pointers get thrown around. + +Example numbers: Dynamic x86 build of 1.6.4, 3DNowExt needs 5.9 s, 3DNow 5.6 s. +3DNowExt-only build: 4.9 s +3DNow-only build: 5.6 s +Now... dynamic build of mpg123 trunk of 2010-05-24: 3DNowExt 4.9 s, 3DNow 5.6 s. That's how it should be. One might investigate how exactly the old ways before mpg123 1.8 worked against the K6-3+ ... possibly helping performance issues seen with the mpg123 coded for MPlayer on that CPU. + +-- +Thomas. + diff --git a/deps/mpg123/equalize.dat b/deps/mpg123/equalize.dat new file mode 100644 index 0000000..8cefb34 --- /dev/null +++ b/deps/mpg123/equalize.dat @@ -0,0 +1,37 @@ +# in every line, there are two values. One for the left +# and one for the right cahnnel. +# the first line is the multiplicator for the lowest frequency band +# the 32th line for the highest freq. band +# +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 +1.0 1.0 diff --git a/deps/mpg123/libmpg123.pc.in b/deps/mpg123/libmpg123.pc.in new file mode 100644 index 0000000..198ff70 --- /dev/null +++ b/deps/mpg123/libmpg123.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libmpg123 +Description: An optimised MPEG Audio decoder +Requires: +Version: @PACKAGE_VERSION@ +Libs: -L${libdir} -lmpg123 +Cflags: -I${includedir} diff --git a/deps/mpg123/m4/addrconfig.m4 b/deps/mpg123/m4/addrconfig.m4 new file mode 100644 index 0000000..5494509 --- /dev/null +++ b/deps/mpg123/m4/addrconfig.m4 @@ -0,0 +1,34 @@ +dnl Check whether the AI_ADDRCONFIG flag can be used with getaddrinfo +dnl Taken from APR ... +AC_DEFUN([APR_CHECK_GETADDRINFO_ADDRCONFIG], [ + AC_CACHE_CHECK(for working AI_ADDRCONFIG, apr_cv_gai_addrconfig, [ + AC_TRY_RUN([ +#ifdef HAVE_NETDB_H +#include +#endif +#ifdef HAVE_STRING_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + +int main(int argc, char **argv) { + struct addrinfo hints, *ai; + + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + hints.ai_flags = AI_ADDRCONFIG; + return getaddrinfo("localhost", NULL, &hints, &ai) != 0; +}], [apr_cv_gai_addrconfig=yes], + [apr_cv_gai_addrconfig=no], + [apr_cv_gai_addrconfig=no])]) + +if test $apr_cv_gai_addrconfig = yes; then + AC_DEFINE(HAVE_GAI_ADDRCONFIG, 1, [Define if getaddrinfo accepts the AI_ADDRCONFIG flag]) +fi +]) diff --git a/deps/mpg123/m4/libtool.m4 b/deps/mpg123/m4/libtool.m4 new file mode 100644 index 0000000..44e0ecf --- /dev/null +++ b/deps/mpg123/m4/libtool.m4 @@ -0,0 +1,7982 @@ +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 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, 2009, 2010, 2011 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 57 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_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +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 + +_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) + +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 "$cc_temp" | $SED "s%.*/%%; 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 +AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl + +_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl +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_PATH_CONVERSION_FUNCTIONS])dnl +m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl +m4_require([_LT_CMD_OLD_ARCHIVE])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_WITH_SYSROOT])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 + +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 + +# 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_PREPARE_SED_QUOTE_VARS +# -------------------------- +# Define a few sed substitution that help us do robust quoting. +m4_defun([_LT_PREPARE_SED_QUOTE_VARS], +[# Backslashify 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' +]) + +# _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 "$][$1" | $SED "$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 "$" | $SED "$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' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$[]1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_quote_varnames); do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$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 \\\\""\\\\\$\$var"\\\\"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +_LT_OUTPUT_LIBTOOL_INIT +]) + +# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) +# ------------------------------------ +# Generate a child script FILE with all initialization necessary to +# reuse the environment learned by the parent script, and make the +# file executable. If COMMENT is supplied, it is inserted after the +# `#!' sequence but before initialization text begins. After this +# macro, additional text can be appended to FILE to form the body of +# the child script. The macro ends with non-zero status if the +# file could not be fully written (such as if the disk is full). +m4_ifdef([AS_INIT_GENERATED], +[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], +[m4_defun([_LT_GENERATED_FILE_INIT], +[m4_require([AS_PREPARE])]dnl +[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl +[lt_write_fail=0 +cat >$1 <<_ASEOF || lt_write_fail=1 +#! $SHELL +# Generated by $as_me. +$2 +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$1 <<\_ASEOF || lt_write_fail=1 +AS_SHELL_SANITIZE +_AS_PREPARE +exec AS_MESSAGE_FD>&1 +_ASEOF +test $lt_write_fail = 0 && chmod +x $1[]dnl +m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_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]) +_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], +[# Run this file to recreate a libtool stub with the current configuration.]) + +cat >>"$CONFIG_LT" <<\_LTEOF +lt_cl_silent=false +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) 2011 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. +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) +])# 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 '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + _LT_PROG_REPLACE_SHELLFNS + + 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)], + [Go], [_LT_LANG(GO)], + [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 + + +m4_ifndef([AC_PROG_GO], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_GO. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ +m4_defun([AC_PROG_GO], +[AC_LANG_PUSH(Go)dnl +AC_ARG_VAR([GOC], [Go compiler command])dnl +AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +AC_CHECK_TOOL(GOC, gccgo) +if test -z "$GOC"; then + if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) + fi +fi +if test -z "$GOC"; then + AC_CHECK_PROG(GOC, gccgo, gccgo, false) +fi +])#m4_defun +])#m4_ifndef + + +# _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([AC_PROG_GO], + [LT_LANG(GO)], + [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) + +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)]) +AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) +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], []) +dnl AC_DEFUN([AC_LIBTOOL_RC], []) + + +# _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 there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 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" + ]) + + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], + [lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD + echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD + $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + ]) + 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" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +]) + + +# _LT_DARWIN_LINKER_FEATURES([TAG]) +# --------------------------------- +# 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 + if test "$lt_cv_ld_force_load" = "yes"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], + [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + fi + _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=func_echo_all + _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([TAGNAME]) +# ---------------------------------- +# 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. +# Store the results from the different compilers for each TAGNAME. +# Allow to override them for all tags through lt_cv_aix_libpath. +m4_defun([_LT_SYS_MODULE_PATH_AIX], +[m4_require([_LT_DECL_SED])dnl +if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], + [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ + lt_aix_libpath_sed='[ + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }]' + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`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 "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi],[]) + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" + fi + ]) + aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) +fi +])# _LT_SYS_MODULE_PATH_AIX + + +# _LT_SHELL_INIT(ARG) +# ------------------- +m4_define([_LT_SHELL_INIT], +[m4_divert_text([M4SH-INIT], [$1 +])])# _LT_SHELL_INIT + + + +# _LT_PROG_ECHO_BACKSLASH +# ----------------------- +# Find how we can fake an echo command that does not interpret backslash. +# In particular, with Autoconf 2.60 or later we add some code to the start +# of the generated configure script which will find a shell with a builtin +# printf (which we can use as an echo command). +m4_defun([_LT_PROG_ECHO_BACKSLASH], +[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +AC_MSG_CHECKING([how to print strings]) +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$[]1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + +case "$ECHO" in + printf*) AC_MSG_RESULT([printf]) ;; + print*) AC_MSG_RESULT([print -r]) ;; + *) AC_MSG_RESULT([cat]) ;; +esac + +m4_ifdef([_AS_DETECT_SUGGESTED], +[_AS_DETECT_SUGGESTED([ + test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test "X`printf %s $ECHO`" = "X$ECHO" \ + || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) + +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) +_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) +])# _LT_PROG_ECHO_BACKSLASH + + +# _LT_WITH_SYSROOT +# ---------------- +AC_DEFUN([_LT_WITH_SYSROOT], +[AC_MSG_CHECKING([for sysroot]) +AC_ARG_WITH([sysroot], +[ --with-sysroot[=DIR] Search for dependent libraries within DIR + (or the compiler's sysroot if not specified).], +[], [with_sysroot=no]) + +dnl lt_sysroot will always be passed unquoted. We quote it here +dnl in case the user passed a directory name. +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + AC_MSG_RESULT([${with_sysroot}]) + AC_MSG_ERROR([The sysroot must be an absolute path.]) + ;; +esac + + AC_MSG_RESULT([${lt_sysroot:-no}]) +_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl +[dependent libraries, and in which our libraries should be installed.])]) + +# _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 '$LINENO' "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 + ;; +*-*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*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; + *) + 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_PROG_AR +# ----------- +m4_defun([_LT_PROG_AR], +[AC_CHECK_TOOLS(AR, [ar], false) +: ${AR=ar} +: ${AR_FLAGS=cru} +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) + +AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], + [lt_cv_ar_at_file=no + AC_COMPILE_IFELSE([AC_LANG_PROGRAM], + [echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + ]) + ]) + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi +_LT_DECL([], [archiver_list_spec], [1], + [How to feed a file listing to the archiver]) +])# _LT_PROG_AR + + +# _LT_CMD_OLD_ARCHIVE +# ------------------- +m4_defun([_LT_CMD_OLD_ARCHIVE], +[_LT_PROG_AR + +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 \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" +fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac +_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_DECL([], [lock_old_archive_extraction], [0], + [Whether to use a lock for old archive extraction]) +])# _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:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/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 "$_lt_linker_boilerplate" | $SED '/^$/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; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + 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 + ;; + + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + + 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"`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$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 $LINENO "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 + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 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; + else puts (dlerror ()); + } + /* 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:$LINENO: $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:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/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 +m4_require([_LT_CHECK_SHELL_FEATURES])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 + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # 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 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # 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; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +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 # correct to gnu/linux during the next big refactor + 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 # correct to gnu/linux during the next big refactor + 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=`func_echo_all "$lib" | $SED '\''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 # correct to gnu/linux during the next big refactor + 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,$cc_basename in + yes,*) + # gcc + 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}' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + 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 + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH. + 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 + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # 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' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # 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 # correct to gnu/linux during the next big refactor + 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 + ;; + +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[[23]].*) 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 # correct to gnu/linux during the next big refactor + 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 + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + 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=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + 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' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[[3-9]]*) + version_type=linux # correct to gnu/linux during the next big refactor + 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 # correct to gnu/linux during the next big refactor + 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 glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + version_type=linux # correct to gnu/linux during the next big refactor + 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 + AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], + [lt_cv_shlibpath_overrides_runpath=no + 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], + [lt_cv_shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + ]) + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # 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;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 # correct to gnu/linux during the next big refactor + 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 # correct to gnu/linux during the next big refactor + 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 # correct to gnu/linux during the next big refactor + 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 # correct to gnu/linux during the next big refactor + 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 # correct to gnu/linux during the next big refactor + 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 # correct to gnu/linux during the next big refactor + 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([], [install_override_mode], [1], + [Permission mode override for installation of shared libraries]) +_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 +m4_require([_LT_PROG_ECHO_BACKSLASH])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 + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +haiku*) + 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])(-bit)?( [LM]SB)? 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 glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-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_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` + fi + ;; + esac +fi + +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_DECL([], [file_magic_glob], [1], + [How to find potential files when deplibs_check_method = "file_magic"]) +_LT_DECL([], [want_nocaseglob], [1], + [Find potential files using nocaseglob 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. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi + 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:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: $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:$LINENO: 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_CHECK_SHAREDLIB_FROM_LINKLIB +# -------------------------------- +# how to determine the name of the shared library +# associated with a specific link library. +# -- PORTME fill in with the dynamic library characteristics +m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], +[m4_require([_LT_DECL_EGREP]) +m4_require([_LT_DECL_OBJDUMP]) +m4_require([_LT_DECL_DLLTOOL]) +AC_CACHE_CHECK([how to associate runtime and link libraries], +lt_cv_sharedlib_from_linklib_cmd, +[lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac +]) +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + +_LT_DECL([], [sharedlib_from_linklib_cmd], [1], + [Command to associate shared and link libraries]) +])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB + + +# _LT_PATH_MANIFEST_TOOL +# ---------------------- +# locate the manifest tool +m4_defun([_LT_PATH_MANIFEST_TOOL], +[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], + [lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&AS_MESSAGE_LOG_FD + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest*]) +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi +_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl +])# _LT_PATH_MANIFEST_TOOL + + +# LT_LIB_M +# -------- +# check for math library +AC_DEFUN([LT_LIB_M], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-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 + case $cc_basename in + nvcc*) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; + *) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; + esac + + _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([AC_PROG_AWK])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};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ +" /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 + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # 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 +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT@&t@_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT@&t@_DLSYM_CONST +#else +# define LT@&t@_DLSYM_CONST const +#endif + +#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. */ +LT@&t@_DLSYM_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_globsym_save_LIBS=$LIBS + lt_globsym_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_globsym_save_LIBS + CFLAGS=$lt_globsym_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 + +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then + nm_file_list_spec='@' +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_DECL([], [nm_file_list_spec], [1], + [Specify filename containing input files for $NM]) +]) # _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)= + +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)= + ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $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 + ;; + 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). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + 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 | kopensolaris*-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* | bgxl[[cC]]* | mpixl[[cC]]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene + _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* | sunCC*) + # 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' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + + 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 + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' + if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" + fi + ;; + 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 | kopensolaris*-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' + ;; + nagfor*) + # NAG Fortran compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # 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* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + _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\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) + # 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)='' + ;; + *Sun\ F* | *Sun*Fortran*) + _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 ' + ;; + *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,' + ;; + *Intel*\ [[CF]]*Compiler*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + *Portland\ Group*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + 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* | sunf77* | sunf90* | sunf95*) + _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_CACHE_CHECK([for $compiler option to produce PIC], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) + +# +# 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]) + +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) +# +# 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_PATH_MANIFEST_TOOL])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' + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + 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 + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". + 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") || (\$ 2 == "W")) && ([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*) + case $cc_basename in + cl*) + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + ;; + esac + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +], [ + 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_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 + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; + *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = 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 + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [[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.19, 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 install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_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(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _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/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + + 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 + ;; + + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + 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 | kopensolaris*-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=' $pic_flag' + 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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # 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; func_echo_all \"$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]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + ;; + 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; func_echo_all \"$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* | bgf* | bgxlf* | mpixlf*) + # 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)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_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 $linker_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 $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $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 $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $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 $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $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 + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". + 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") || (\$ 2 == "W")) && ([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([$1]) + _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 func_echo_all "${wl}${allow_undefined_flag}"; 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([$1]) + _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' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi + _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. + case $cc_basename in + cl*) + # Native MSVC + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # 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 $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + _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' + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + _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 `func_echo_all "$deplibs" | $SED '\''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(enable_shared_with_static_runtimes, $1)=yes + ;; + esac + ;; + + 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 + ;; + + # 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 $pic_flag -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 $pic_flag ${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 && test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${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_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 && test "$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 $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${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' + ;; + *) + m4_if($1, [], [ + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + _LT_LINKER_OPTION([if $CC understands -b], + _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], + [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_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 $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${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. + # This should be the same for all languages, so no per-tag cache variable. + AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], + [lt_cv_irix_exported_symbol], + [save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE( + [AC_LANG_SOURCE( + [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], + [C++], [[int foo (void) { return 0; }]], + [Fortran 77], [[ + subroutine foo + end]], + [Fortran], [[ + subroutine foo + end]])])], + [lt_cv_irix_exported_symbol=yes], + [lt_cv_irix_exported_symbol=no]) + LDFLAGS="$save_LDFLAGS"]) + if test "$lt_cv_irix_exported_symbol" = yes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -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" && func_echo_all "-set_version $verstring"` -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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${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" && func_echo_all "-set_version $verstring"` -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} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${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" && func_echo_all "-set_version $verstring"` -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 "-set_version $verstring"` -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 $pic_flag ${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 $pic_flag ${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_CACHE_CHECK([whether -lc should be explicitly linked in], + [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), + [$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_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + lt_cv_[]_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* + ]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_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_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([], [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([], [postlink_cmds], [2], + [Commands necessary for finishing linking programs]) +_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_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], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +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 + +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_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(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_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_CFLAGS=$CFLAGS + 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++"} + CFLAGS=$CXXFLAGS + 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 $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -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 -v "^Configured with:" | $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([$1]) + _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 func_echo_all "${wl}${allow_undefined_flag}"; 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([$1]) + _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' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi + _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*) + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # 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 + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # 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 $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _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(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _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 + ;; + esac + ;; + 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 + ;; + + freebsd2.*) + # 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*) + ;; + + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + 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; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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; func_echo_all "$list"' + ;; + *) + 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 $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${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" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_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 $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -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 | kopensolaris*-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; func_echo_all "$list"' + + _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 | sort | $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 | sort | $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 | sort | $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 | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 and above 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; func_echo_all \"$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=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + ;; + xl* | mpixl* | bgxl*) + # 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; func_echo_all \"$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='func_echo_all' + + # 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=func_echo_all + 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" && func_echo_all "${wl}-set_version $verstring"` -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" && func_echo_all "-set_version $verstring"` -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 "-set_version $verstring"` -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=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + 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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${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 -v "^Configured with:" | $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* | sunCC*) + # 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='func_echo_all' + + # 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 $pic_flag -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 $pic_flag -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 -v "^Configured with:" | $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 -v "^Configured with:" | $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(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ + '"$_LT_TAGVAR(old_archive_cmds, $1)" + _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ + '"$_LT_TAGVAR(reload_cmds, $1)" + ;; + *) + _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 + CFLAGS=$lt_save_CFLAGS + 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_FUNC_STRIPNAME_CNF +# ---------------------- +# func_stripname_cnf 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). +# +# This function is identical to the (non-XSI) version of func_stripname, +# except this one can be used by m4 code that may be executed by configure, +# rather than the libtool script. +m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl +AC_REQUIRE([_LT_DECL_SED]) +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf +])# _LT_FUNC_STRIPNAME_CNF + +# _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 +AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])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 +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF +package foo +func foo() { +} +_LT_EOF +]) + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; +esac + +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 ${prev}${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 + fi + + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac + if test "$pre_test_object_deps_done" = no; then + case ${prev} 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 + prev= + ;; + + *.lto.$objext) ;; # Ignore GCC LTO objects + *.$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 +CFLAGS=$_lt_libdeps_save_CFLAGS + +# 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* | sunCC*) + # 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_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_LANG_PUSH(Fortran 77) +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi + +_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_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(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_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 + lt_save_CFLAGS=$CFLAGS + CC=${F77-"f77"} + CFLAGS=$FFLAGS + 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" + CFLAGS="$lt_save_CFLAGS" +fi # test "$_lt_disable_F77" != yes + +AC_LANG_POP +])# _LT_LANG_F77_CONFIG + + +# _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_LANG_PUSH(Fortran) + +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi + +_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_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(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_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 + lt_save_CFLAGS=$CFLAGS + CC=${FC-"f95"} + CFLAGS=$FCFLAGS + 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 + CFLAGS=$lt_save_CFLAGS +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_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GCJ-"gcj"} +CFLAGS=$GCJFLAGS +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 +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_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 +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GCJ_CONFIG + + +# _LT_LANG_GO_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Go compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GO_CONFIG], +[AC_REQUIRE([LT_PROG_GO])dnl +AC_LANG_SAVE + +# Source file extension for Go test sources. +ac_ext=go + +# Object file extension for compiled Go test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="package main; func main() { }" + +# Code to be used in simple link tests +lt_simple_link_test_code='package main; func main() { }' + +# 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_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GOC-"gccgo"} +CFLAGS=$GOFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# Go 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 +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_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 +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GO_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_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC= +CC=${RC-"windres"} +CFLAGS= +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 +CFLAGS=$lt_save_CFLAGS +])# _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_GO +# ---------- +AC_DEFUN([LT_PROG_GO], +[AC_CHECK_TOOL(GOC, gccgo,) +]) + + +# 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_DLLTOOL +# ---------------- +# Ensure DLLTOOL variable is set. +m4_defun([_LT_DECL_DLLTOOL], +[AC_CHECK_TOOL(DLLTOOL, dlltool, false) +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) +AC_SUBST([DLLTOOL]) +]) + +# _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%"$_lt_dummy"}, \ + = c,a/b,b/c, \ + && 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_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) +# ------------------------------------------------------ +# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and +# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. +m4_defun([_LT_PROG_FUNCTION_REPLACE], +[dnl { +sed -e '/^$1 ()$/,/^} # $1 /c\ +$1 ()\ +{\ +m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) +} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: +]) + + +# _LT_PROG_REPLACE_SHELLFNS +# ------------------------- +# Replace existing portable implementations of several shell functions with +# equivalent extended shell implementations where those features are available.. +m4_defun([_LT_PROG_REPLACE_SHELLFNS], +[if test x"$xsi_shell" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl + func_basename_result="${1##*/}"]) + + _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}"]) + + _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl + # 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}"}]) + + _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl + func_split_long_opt_name=${1%%=*} + func_split_long_opt_arg=${1#*=}]) + + _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) + + _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) + + _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) + + _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) +fi + +if test x"$lt_shell_append" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) + + _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl + func_quote_for_eval "${2}" +dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ + eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) +fi +]) + +# _LT_PATH_CONVERSION_FUNCTIONS +# ----------------------------- +# Determine which file name conversion functions should be used by +# func_to_host_file (and, implicitly, by func_to_host_path). These are needed +# for certain cross-compile configurations and native mingw. +m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_MSG_CHECKING([how to convert $build file names to $host format]) +AC_CACHE_VAL(lt_cv_to_host_file_cmd, +[case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac +]) +to_host_file_cmd=$lt_cv_to_host_file_cmd +AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) +_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], + [0], [convert $build file names to $host format])dnl + +AC_MSG_CHECKING([how to convert $build file names to toolchain format]) +AC_CACHE_VAL(lt_cv_to_tool_file_cmd, +[#assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac +]) +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) +_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], + [0], [convert $build files to toolchain format])dnl +])# _LT_PATH_CONVERSION_FUNCTIONS diff --git a/deps/mpg123/m4/ltoptions.m4 b/deps/mpg123/m4/ltoptions.m4 new file mode 100644 index 0000000..5d9acd8 --- /dev/null +++ b/deps/mpg123/m4/ltoptions.m4 @@ -0,0 +1,384 @@ +# Helper functions for option handling. -*- Autoconf -*- +# +# Copyright (C) 2004, 2005, 2007, 2008, 2009 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 7 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], [1], [Assembler program])dnl + +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl + +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [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@<:@=PKGS@:>@], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [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/deps/mpg123/m4/ltsugar.m4 b/deps/mpg123/m4/ltsugar.m4 new file mode 100644 index 0000000..9000a05 --- /dev/null +++ b/deps/mpg123/m4/ltsugar.m4 @@ -0,0 +1,123 @@ +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltsugar.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) + + +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) + + +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59 which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) + + +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) + + +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl +]) diff --git a/deps/mpg123/m4/ltversion.m4 b/deps/mpg123/m4/ltversion.m4 new file mode 100644 index 0000000..07a8602 --- /dev/null +++ b/deps/mpg123/m4/ltversion.m4 @@ -0,0 +1,23 @@ +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# @configure_input@ + +# serial 3337 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.4.2]) +m4_define([LT_PACKAGE_REVISION], [1.3337]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.4.2' +macro_revision='1.3337' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) diff --git a/deps/mpg123/m4/lt~obsolete.m4 b/deps/mpg123/m4/lt~obsolete.m4 new file mode 100644 index 0000000..c573da9 --- /dev/null +++ b/deps/mpg123/m4/lt~obsolete.m4 @@ -0,0 +1,98 @@ +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2009 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 5 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_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])]) +m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) +m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) +m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) +m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) +m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) +m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) diff --git a/deps/mpg123/makedll.sh b/deps/mpg123/makedll.sh new file mode 100644 index 0000000..2fe9ef6 --- /dev/null +++ b/deps/mpg123/makedll.sh @@ -0,0 +1,19 @@ +#!/bin/sh +if test -e Makefile; then + make clean +fi +options="$@" +echo "using options: $options" +CFLAGS="-march=i686" ./configure --disable-modules --with-cpu=x86_dither $options && +cd src/libmpg123 && +make && +cp .libs/libmpg123-0.dll ../../ && +cp .libs/libmpg123-0.dll.def ../../libmpg123-0.def +cd ../../ && +echo "Now run that lib tool... perhaps you want to strip, too. +Hints: + strip --strip-unneeded libmpg123-0.dll + lib /machine:i386 /def:libmpg123-0.def" || +echo You got some trouble. + + diff --git a/deps/mpg123/man1/mpg123.1 b/deps/mpg123/man1/mpg123.1 new file mode 100644 index 0000000..e9e665e --- /dev/null +++ b/deps/mpg123/man1/mpg123.1 @@ -0,0 +1,512 @@ +.TH mpg123 1 "31 Jan 2008" +.SH NAME +mpg123 \- play audio MPEG 1.0/2.0/2.5 stream (layers 1, 2 and 3) +.SH SYNOPSIS +.B mpg123 +[ +.B options +] +.IR file " ... | " URL " ... | " +.B \- +.SH DESCRIPTION +.B mpg123 +reads one or more +.IR file\^ s +(or standard input if ``\-'' is specified) or +.IR URL\^ s +and plays them on the audio device (default) or +outputs them to stdout. +.IR file\^ / URL +is assumed to be an MPEG audio bit stream. +.SH OPERANDS +The following operands are supported: +.TP 8 +.IR file (s) +The path name(s) of one or more input files. They must be +valid MPEG-1.0/2.0/2.5 audio layer 1, 2 or 3 bit streams. +If a dash ``\-'' is specified, MPEG data will +be read from the standard input. Furthermore, any name +starting with ``http://'' is recognized as +.I URL +(see next section). +.SH OPTIONS +.B mpg123 +options may be either the traditional POSIX one letter options, +or the GNU style long options. POSIX style options start with a +single ``\-'', while GNU long options start with ``\-\^\-''. +Option arguments (if needed) follow separated by whitespace (not ``=''). +Note that some options can be absent from your installation when disabled in the build process. +.SH INPUT OPTIONS +.TP +\fB\-k \fInum\fR, \fB\-\^\-skip \fInum +Skip first +.I num +frames. By default the decoding starts at the first frame. +.TP +\fB\-n \fInum\fR, \fB\-\^\-frames \fInum +Decode only +.I num +frames. By default the complete stream is decoded. +.TP +.BR \-\-fuzzy +Enable fuzzy seeks (guessing byte offsets or using approximate seek points from Xing TOC). +Without that, seeks need a first scan through the file before they can jump at positions. +You can decide here: sample-accurate operation with gapless features or faster (fuzzy) seeking. +.TP +.BR \-y ", " \-\^\-no\-resync +Do NOT try to resync and continue decoding if an error occurs in +the input file. Normally, +.B mpg123 +tries to keep the playback alive at all costs, including skipping invalid material and searching new header when something goes wrong. +With this switch you can make it bail out on data errors +(and perhaps spare your ears a bad time). Note that this switch has been renamed from \-\-resync. +The old name still works, but is not advertised or recommened to use (subject to removal in future). +.TP +\fB\-\^-resync\-limit \fIbytes\fR +Set number of bytes to search for valid MPEG data once lost in stream; <0 means search whole stream. +If you know there are huge chunks of invalid data in your files... here is your hammer. +Note: Only since version 1.14 this also increases the amount of junk skipped on beginning. +.TP +\fB\-p \fIURL \fR| \fBnone\fR, \fB\-\^\-proxy \fIURL \fR| \fBnone +The specified +.I proxy +will be used for HTTP requests. It +should be specified as full URL (``http://host.domain:port/''), +but the ``http://'' prefix, the port number and the trailing +slash are optional (the default port is 80). Specifying +.B none +means not to use any proxy, and to retrieve files directly +from the respective servers. See also the +``HTTP SUPPORT'' section. +.TP +\fB\-u \fIauth\fR, \fB\-\^\-auth \fIauth +HTTP authentication to use when recieving files via HTTP. +The format used is user:password. +.TP +\fB\-@ \fIfile\fR, \fB\-\^\-list \fIfile +Read filenames and/or URLs of MPEG audio streams from the specified +.I file +in addition to the ones specified on the command line (if any). +Note that +.I file +can be either an ordinary file, a dash ``\-'' to indicate that +a list of filenames/URLs is to be read from the standard input, +or an URL pointing to a an appropriate list file. Note: only +one +.B \-@ +option can be used (if more than one is specified, only the +last one will be recognized). +.TP +\fB\-l \fIn\fR, \fB\-\^\-listentry \fIn +Of the playlist, play specified entry only. +.I n +is the number of entry starting at 1. A value of 0 is the default and means playling the whole list, a negative value means showing of the list of titles with their numbers... +.TP +\fB\-\-loop \fItimes\fR +for looping track(s) a certain number of times, < 0 means infinite loop (not with \-\-random!). +.TP +.BR \-\-keep\-open +For remote control mode: Keep loaded file open after reaching end. +.TP +\fB\-\-timeout \fIseconds\fR +Timeout in (integer) seconds before declaring a stream dead (if <= 0, wait forever). +.TP +.BR \-z ", " \-\^\-shuffle +Shuffle play. Randomly shuffles the order of files specified on the command +line, or in the list file. +.TP +.BR \-Z ", " \-\-random +Continuous random play. Keeps picking a random file from the command line +or the play list. Unlike shuffle play above, random play never ends, and +plays individual songs more than once. +.TP +\fB\-\^\-no\-icy\-meta +Do not accept ICY meta data. +.TP +\fB\-i, \-\^-\index +Index / scan through the track before playback. +This fills the index table for seeking (if enabled in libmpg123) and may make the operating system cache the file contents for smoother operating on playback. +.TP +\fB\-\-index\-size \fIsize\fR +Set the number of entries in the seek frame index table. +.TP +\fB\-\-preframes \fInum\fR +Set the number of frames to be read as lead-in before a seeked-to position. +This serves to fill the layer 3 bit reservoir, which is needed to faithfully reproduce a certain sample at a certain position. +Note that for layer 3, a minimum of 1 is enforced (because of frame overlap), and for layer 1 and 2, this is limited to 2 (no bit reservoir in that case, but engine spin-up anyway). + +.SH OUTPUT and PROCESSING OPTIONS +.TP +\fB\-o \fImodule\fR, \-\^\-output \fImodule\fR +Select audio output module. You can provide a comma-separated list to use the first one that works. +.TP +\fB\-\^\-list\-modules +List the available modules. +.TP +\fB\-a \fIdev\fR, \fB\-\^\-audiodevice \fIdev +Specify the audio device to use. The default is +system-dependent (usually /dev/audio or /dev/dsp). +Use this option if you have multiple audio devices and +the default is not what you want. +.TP +.BR \-s ", " \-\^\-stdout +The decoded audio samples are written to standard output, +instead of playing them through the audio device. This +option must be used if your audio hardware is not supported +by +.BR mpg123 . +The output format per default is raw (headerless) linear PCM audio data, +16 bit, stereo, host byte order (you can force mono or 8bit). +.TP +\fB\-O \fIfile\fR, \fB\-\^\-outfile +Write raw output into a file (instead of simply redirecting standard output to a file with the shell). +.TP +\fB\-w \fIfile\fR, \fB\-\^\-wav +Write output as WAV file. This will cause the MPEG stream to be decoded +and saved as file +.I file +, or standard output if +.I - +is used as file name. You can also use +.I --au +and +.I --cdr +for AU and CDR format, respectively. +.TP +\fB\-\^\-au \fIfile +Does not play the MPEG file but writes it to +.I file +in SUN audio format. If \- is used as the filename, the AU file is +written to stdout. +.TP +\fB\-\^\-cdr \fIfile +Does not play the MPEG file but writes it to +.I file +as a CDR file. If \- is used as the filename, the CDR file is written +to stdout. +.TP +.BR \-\-reopen +Forces reopen of the audiodevice after ever song +.TP +.BR \-\-cpu\ \fIdecoder\-type +Selects a certain decoder (optimized for specific CPU), for example i586 or MMX. +The list of available decoders can vary; depending on the build and what your CPU supports. +This options is only availabe when the build actually includes several optimized decoders. +.TP +.BR \-\-test\-cpu +Tests your CPU and prints a list of possible choices for \-\-cpu. +.TP +.BR \-\-list\-cpu +Lists all available decoder choices, regardless of support by your CPU. +.TP +\fB\-g \fIgain\fR, \fB\-\^\-gain \fIgain +[DEPRECATED] Set audio hardware output gain (default: don't change). The unit of the gain value is hardware and output module dependent. +(This parameter is only provided for backwards compatibility and may be removed in the future without prior notice. Use the audio player for playing and a mixer app for mixing, UNIX style!) +.TP +\fB\-f \fIfactor\fR, \fB\-\^\-scale \fIfactor +Change scale factor (default: 32768). +.TP +.BR \-\-rva-mix,\ \-\-rva-radio +Enable RVA (relative volume adjustment) using the values stored for ReplayGain radio mode / mix mode with all tracks roughly equal loudness. +The first valid information found in ID3V2 Tags (Comment named RVA or the RVA2 frame) or ReplayGain header in Lame/Info Tag is used. +.TP +.BR \-\-rva-album,\ \-\-rva-audiophile +Enable RVA (relative volume adjustment) using the values stored for ReplayGain audiophile mode / album mode with usually the effect of adjusting album loudness but keeping relative loudness inside album. +The first valid information found in ID3V2 Tags (Comment named RVA_ALBUM or the RVA2 frame) or ReplayGain header in Lame/Info Tag is used. +.TP +.BR \-0 ", " \-\^\-single0 "; " \-1 ", " \-\^\-single1 +Decode only channel 0 (left) or channel 1 (right), +respectively. These options are available for +stereo MPEG streams only. +.TP +.BR \-m ", " \-\^\-mono ", " \-\^\-mix ", " \-\^\-singlemix +Mix both channels / decode mono. It takes less +CPU time than full stereo decoding. +.TP +.BR \-\-stereo +Force stereo output +.TP +\fB\-r \fIrate\fR, \fB\-\^\-rate \fIrate +Set sample rate (default: automatic). You may want to +change this if you need a constant bitrate independent of +the mpeg stream rate. mpg123 automagically converts the +rate. You should then combine this with \-\-stereo or \-\-mono. +.TP +.BR \-2 ", " \-\^\-2to1 "; " \-4 ", " \-\^\-4to1 +Performs a downsampling of ratio 2:1 (22 kHz) or 4:1 (11 kHz) +on the output stream, respectively. Saves some CPU cycles, but +at least the 4:1 ratio sounds ugly. +.TP +.BR \-\-pitch\ \fIvalue +Set hardware pitch (speedup/down, 0 is neutral; 0.05 is 5%). This changes the output sampling rate, so it only works in the range your audio system/hardware supports. +.TP +.BR \-\-8bit +Forces 8bit output +.TP +\fB\-\^\-float +Forces f32 encoding +.TP +\fp\-e \fIenc\fR, \fB\-\^\-encoding \fIenc +Choose output sample encoding. Possible values look like f32 (32-bit floating point), s32 (32-bit signed integer), u32 (32-bit unsigned integer) and the variants with different numbers of bits (s24, u24, s16, u16, s8, u8) and also special variants like ulaw and alaw 8-bit. +See the output of mpg123's longhelp for actually available encodings. +.TP +\fB\-d \fIn\fR, \fB\-\^\-doublespeed \fIn +Only play every +.IR n 'th +frame. This will cause the MPEG stream +to be played +.I n +times faster, which can be used for special +effects. Can also be combined with the +.B \-\^\-halfspeed +option to play 3 out of 4 frames etc. Don't expect great +sound quality when using this option. +.TP +\fB\-h \fIn\fR, \fB\-\^\-halfspeed \fIn +Play each frame +.I n +times. This will cause the MPEG stream +to be played at +.IR 1 / n 'th +speed (n times slower), which can be +used for special effects. Can also be combined with the +.B \-\^\-doublespeed +option to double every third frame or things like that. +Don't expect great sound quality when using this option. +.TP +\fB\-E \fIfile\fR, \fB\-\^\-equalizer +Enables equalization, taken from +.IR file . +The file needs to contain 32 lines of data, additional comment lines may +be prefixed with +.IR # . +Each data line consists of two floating-point entries, separated by +whitespace. They specify the multipliers for left and right channel of +a certain frequency band, respectively. The first line corresponds to the +lowest, the 32nd to the highest frequency band. +Note that you can control the equalizer interactively with the generic control interface. +.TP +\fB\-\^\-gapless +Enable code that cuts (junk) samples at beginning and end of tracks, enabling gapless transitions between MPEG files when encoder padding and codec delays would prevent it. +This is enabled per default beginning with mpg123 version 1.0.0 . +.TP +\fB\-\^\-no\-gapless +Disable the gapless code. That gives you MP3 decodings that include encoder delay and padding plus mpg123's decoder delay. +.TP +\fB\-D \fIn\fR, \fB\-\-delay \fIn +Insert a delay of \fIn\fR seconds before each track. +.TP +.BR "\-o h" ", " \-\^\-headphones +Direct audio output to the headphone connector (some hardware only; AIX, HP, SUN). +.TP +.BR "\-o s" ", " \-\^\-speaker +Direct audio output to the speaker (some hardware only; AIX, HP, SUN). +.TP +.BR "\-o l" ", " \-\^\-lineout +Direct audio output to the line-out connector (some hardware only; AIX, HP, SUN). +.TP +\fB\-b \fIsize\fR, \fB\-\^\-buffer \fIsize +Use an audio output buffer of +.I size +Kbytes. This is useful to bypass short periods of heavy +system activity, which would normally cause the audio output +to be interrupted. +You should specify a buffer size of at least 1024 +(i.e. 1 Mb, which equals about 6 seconds of audio data) or more; +less than about 300 does not make much sense. The default is 0, +which turns buffering off. +.TP +\fB\-\^\-preload \fIfraction +Wait for the buffer to be filled to +.I fraction +before starting playback (fraction between 0 and 1). You can tune this prebuffering to either get faster sound to your ears or safer uninterrupted web radio. +Default is 1 (wait for full buffer before playback). +.TP +\fB\-\^\-smooth +Keep buffer over track boundaries -- meaning, do not empty the buffer between tracks for possibly some added smoothness. + +.SH MISC OPTIONS + +.TP +.BR \-t ", " \-\^\-test +Test mode. The audio stream is decoded, but no output occurs. +.TP +.BR \-c ", " \-\^\-check +Check for filter range violations (clipping), and report them for each frame +if any occur. +.TP +.BR \-v ", " \-\^\-verbose +Increase the verbosity level. For example, displays the frame +numbers during decoding. +.TP +.BR \-q ", " \-\^\-quiet +Quiet. Suppress diagnostic messages. +.TP +.BR \-C ", " \-\^\-control +Enable terminal control keys. By default use 's' or the space bar to stop/restart (pause, unpause) playback, 'f' to jump forward to the next song, 'b' to jump back to the +beginning of the song, ',' to rewind, '.' to fast forward, and 'q' to quit. +Type 'h' for a full list of available controls. +.TP +\fB\-\^\-title +In an xterm, or rxvt (compatible, TERM environment variable is examined), change the window's title to the name of song currently +playing. +.TP +\fB\-\^\-long\-tag +Display ID3 tag info always in long format with one line per item (artist, title, ...) +.TP +.BR \-\-utf8 +Regardless of environment, print metadata in UTF-8 (otherwise, when not using UTF-8 locale, you'll get ASCII stripdown). +.TP +.BR \-R ", " \-\^\-remote +Activate generic control interface. +.B mpg123 +will then read and execute commands from stdin. Basic usage is ``load '' to play some file and the obvious ``pause'', ``command. +``jump '' will jump/seek to a given point (MPEG frame number). +Issue ``help'' to get a full list of commands and syntax. +.TP +.BR \-\^\-remote\-err +Print responses for generic control mode to standard error, not standard out. +This is automatically triggered when using +.B -s +\fN. +.TP +\fB\-\-fifo \fIpath +Create a fifo / named pipe on the given path and use that for reading commands instead of standard input. +.TP +\fB\-\^\-aggressive +Tries to get higher priority +.TP +.BR \-T ", " \-\-realtime +Tries to gain realtime priority. This option usually requires root +privileges to have any effect. +.TP +.BR \-? ", " \-\^\-help +Shows short usage instructions. +.TP +.BR \-\^\-longhelp +Shows long usage instructions. +.TP +.BR \-\^\-version +Print the version string. +.SH HTTP SUPPORT +In addition to reading MPEG audio streams from ordinary +files and from the standard input, +.B mpg123 +supports retrieval of MPEG audio files or playlists via the HTTP protocol, +which is used in the World Wide Web (WWW). Such files are +specified using a so-called URL, which starts with ``http://''. When a file with +that prefix is encountered, +.B mpg123 +attempts to open an HTTP connection to the server in order to +retrieve that file to decode and play it. +.P +It is often useful to retrieve files through a WWW cache or +so-called proxy. To accomplish this, +.B mpg123 +examines the environment for variables named +.BR MP3_HTTP_PROXY ", " http_proxy " and " HTTP_PROXY , +in this order. The value of the first one that is set will +be used as proxy specification. To override this, you can +use the +.B \-p +command line option (see the ``OPTIONS'' section). Specifying +.B "\-p none" +will enforce contacting the server directly without using +any proxy, even if one of the above environment variables +is set. +.P +Note that, in order to play MPEG audio files from a WWW +server, it is necessary that the connection to that server +is fast enough. For example, a 128 kbit/s MPEG file +requires the network connection to be at least 128 kbit/s +(16 kbyte/s) plus protocol overhead. If you suffer from +short network outages, you should try the +.B \-b +option (buffer) to bypass such outages. If your network +connection is generally not fast enough to retrieve MPEG +audio files in realtime, you can first download the files +to your local harddisk (e.g. using +.BR wget (1)) +and then play them from there. +.P +If authentication is needed to access the file it can be +specified with the +.BR "\-u user:pass". +.SH INTERRUPT +When in terminal control mode, you can quit via pressing the q key, +while any time you can abort +.B mpg123 +by pressing Ctrl-C. If not in terminal control mode, this will +skip to the next file (if any). If you want to abort playing immediately +in that case, press Ctrl-C twice in short succession (within about one second). +.P +Note that the result of quitting +.B mpg123 +pressing Ctrl-C might not be audible +immediately, due to audio data buffering in the audio device. +This delay is system dependent, but it is usually not more +than one or two seconds. +.SH "SEE ALSO" +.BR wget (1), +.BR sox (1), +.SH NOTES +MPEG audio decoding requires a good deal of CPU performance, +especially layer-3. To decode it in realtime, you should +have at least an i486DX4, Pentium, Alpha, SuperSparc or equivalent +processor. You can also use the +.B -m +option to decode mono only, which reduces the CPU load +somewhat for layer-3 streams. See also the +.BR \-2 " and " \-4 +options. +.P +If everything else fails, use the +.B \-s +option to decode to standard output, direct it into a file +and then use an appropriate utility to play that file. +You might have to use a tool such as +.BR sox (1) +to convert the output to an audio format suitable for +your audio player. +.P +If your system is generally fast enough to decode in +realtime, but there are sometimes periods of heavy +system load (such as cronjobs, users logging in remotely, +starting of ``big'' programs etc.) causing the +audio output to be interrupted, then you should use +the +.B \-b +option to use a buffer of reasonable size (at least 1000 Kbytes). +.SH BUGS +.P +Mostly MPEG-1 layer 2 and 3 are tested in real life. +Please report any issues and provide test files to help fixing them. +.P +Free format streams are not supported, but they could be (there is some code). +.P +No CRC error checking is performed. +.P +Some platforms lack audio hardware support; you may be able to use the +.B -s +switch to feed the decoded data to a program that can play it on your audio device. +Notably, this includes Tru64 with MME, but you should be able to install and use OSS there (it perhaps will perform better as MME would anyway). +.SH AUTHORS +.TP +Maintainers: +.br +Thomas Orgis , +.br +Nicholas J. Humfrey +.TP +Creator: +.br +Michael Hipp +.TP +Uses code or ideas from various people, see the AUTHORS file accompanying the source code. +.SH LICENSE +.B mpg123 +is licensed under the GNU Lesser/Library General Public License, LGPL, version 2.1 . +.SH WEBSITE +http://www.mpg123.org +.br +http://sourceforge.net/projects/mpg123 diff --git a/deps/mpg123/mpg123.spec b/deps/mpg123/mpg123.spec new file mode 100644 index 0000000..a34a573 --- /dev/null +++ b/deps/mpg123/mpg123.spec @@ -0,0 +1,68 @@ +# This is a generic spec file that should "just work" with rpmbuild on any distro. +# Make sure you have appropriate -devel packes installed: +# - the package providing libltdl.so and .la (libtool or libtool-devel) +# - devel packages for alsa, sdl, etc... to build the respective output modules. +Summary: The fast console mpeg audio decoder/player. +Name: mpg123 +Version: 1.14.4 +Release: 1 +URL: http://www.mpg123.org/ +License: GPL +Group: Applications/Multimedia +Packager: Michael Ryzhykh +Source: http://www.mpg123.org/download/mpg123-%{version}.tar.bz2 +BuildRoot: %_tmppath/%name-%version +Prefix: /usr +# That is specific to fedora 4 already. +#BuildPrereq: libtool-ltdl-devel + +%description +This is a console based decoder/player for mono/stereo mpeg audio files, +probably more familiar as MP3 or MP2 files. It's focus is speed. +It can play MPEG1.0/2.0/2.5 layer I, II, II (1, 2, 3;-) files +(VBR files are fine, too) and produce output on a number of different ways: +raw data to stdout and different sound systems depending on your platform. + +%package devel +Summary: Files needed for development with mpg123 +Group: Development/Libraries + +%description devel +Libraries and header files for development with mpg123. + +%prep +%setup -q -n %name-%version + +%build +%configure --with-cpu=x86_dither --enable-shared --enable-static --disable-ltdl-install +make + +%install +%{__rm} -rf %{buildroot} +%makeinstall + +%clean +%{__rm} -rf %{buildroot} + +%files +%defattr(755,root,root) +%{_bindir}/* +%defattr(644,root,root) +%doc %{_mandir}/*/mpg123.1.gz +%{_libdir}/libmpg123.so.* +%{_libdir}/mpg123/output_*.la +%{_libdir}/mpg123/output_*.so + +%files devel +%defattr(644,root,root) +%{_libdir}/pkgconfig/libmpg123.pc +%{_includedir}/*.h +%{_libdir}/libmpg123.a +%{_libdir}/libmpg123.la +%{_libdir}/libmpg123.so +%exclude %{_libdir}/mpg123/output_*.a + +%changelog +* Tue Jan 1 2008 Michael Ryzhykh +- Initial Version. + diff --git a/deps/mpg123/mpg123.spec.in b/deps/mpg123/mpg123.spec.in new file mode 100644 index 0000000..754b0c8 --- /dev/null +++ b/deps/mpg123/mpg123.spec.in @@ -0,0 +1,68 @@ +# This is a generic spec file that should "just work" with rpmbuild on any distro. +# Make sure you have appropriate -devel packes installed: +# - the package providing libltdl.so and .la (libtool or libtool-devel) +# - devel packages for alsa, sdl, etc... to build the respective output modules. +Summary: The fast console mpeg audio decoder/player. +Name: @PACKAGE_NAME@ +Version: @PACKAGE_VERSION@ +Release: 1 +URL: http://www.mpg123.org/ +License: GPL +Group: Applications/Multimedia +Packager: Michael Ryzhykh +Source: http://www.mpg123.org/download/mpg123-%{version}.tar.bz2 +BuildRoot: %_tmppath/%name-%version +Prefix: /usr +# That is specific to fedora 4 already. +#BuildPrereq: libtool-ltdl-devel + +%description +This is a console based decoder/player for mono/stereo mpeg audio files, +probably more familiar as MP3 or MP2 files. It's focus is speed. +It can play MPEG1.0/2.0/2.5 layer I, II, II (1, 2, 3;-) files +(VBR files are fine, too) and produce output on a number of different ways: +raw data to stdout and different sound systems depending on your platform. + +%package devel +Summary: Files needed for development with mpg123 +Group: Development/Libraries + +%description devel +Libraries and header files for development with mpg123. + +%prep +%setup -q -n %name-%version + +%build +%configure --with-cpu=x86_dither --enable-shared --enable-static --disable-ltdl-install +make + +%install +%{__rm} -rf %{buildroot} +%makeinstall + +%clean +%{__rm} -rf %{buildroot} + +%files +%defattr(755,root,root) +%{_bindir}/* +%defattr(644,root,root) +%doc %{_mandir}/*/mpg123.1.gz +%{_libdir}/libmpg123.so.* +%{_libdir}/mpg123/output_*.la +%{_libdir}/mpg123/output_*.so + +%files devel +%defattr(644,root,root) +%{_libdir}/pkgconfig/libmpg123.pc +%{_includedir}/*.h +%{_libdir}/libmpg123.a +%{_libdir}/libmpg123.la +%{_libdir}/libmpg123.so +%exclude %{_libdir}/mpg123/output_*.a + +%changelog +* Tue Jan 1 2008 Michael Ryzhykh +- Initial Version. + diff --git a/deps/mpg123/ports/MSVC++/2005/libmpg123/libmpg123.vcproj b/deps/mpg123/ports/MSVC++/2005/libmpg123/libmpg123.vcproj new file mode 100644 index 0000000..36a0174 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2005/libmpg123/libmpg123.vcproj @@ -0,0 +1,741 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deps/mpg123/ports/MSVC++/2008/dump_seekindex/dump_seekindex.vcproj b/deps/mpg123/ports/MSVC++/2008/dump_seekindex/dump_seekindex.vcproj new file mode 100644 index 0000000..63d72c5 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008/dump_seekindex/dump_seekindex.vcproj @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deps/mpg123/ports/MSVC++/2008/feedseek/feedseek.vcproj b/deps/mpg123/ports/MSVC++/2008/feedseek/feedseek.vcproj new file mode 100644 index 0000000..edd66e8 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008/feedseek/feedseek.vcproj @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deps/mpg123/ports/MSVC++/2008/libmpg123/libmpg123.vcproj b/deps/mpg123/ports/MSVC++/2008/libmpg123/libmpg123.vcproj new file mode 100644 index 0000000..e81f608 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008/libmpg123/libmpg123.vcproj @@ -0,0 +1,1357 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deps/mpg123/ports/MSVC++/2008/mpg123.sln b/deps/mpg123/ports/MSVC++/2008/mpg123.sln new file mode 100644 index 0000000..5e6369e --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008/mpg123.sln @@ -0,0 +1,44 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmpg123", "libmpg123\libmpg123.vcproj", "{67CAA87B-7CF1-4F93-BB67-21C513F40803}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mpglib", "mpglib\mpglib.vcproj", "{9FB32EE1-C45A-4CCD-9AC8-112C43AF80A7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "feedseek", "feedseek\feedseek.vcproj", "{472481BF-11B6-41A9-BF6A-8BE16A7F8FD6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scan", "scan\scan.vcproj", "{245C2785-2FA9-4A6B-8558-35BB8473AEA1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dump_seekindex", "dump_seekindex\dump_seekindex.vcproj", "{B086EA3E-700A-4DED-A91D-85ED8A79A8FC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {67CAA87B-7CF1-4F93-BB67-21C513F40803}.Debug|Win32.ActiveCfg = Debug_Generic|Win32 + {67CAA87B-7CF1-4F93-BB67-21C513F40803}.Debug|Win32.Build.0 = Debug_Generic|Win32 + {67CAA87B-7CF1-4F93-BB67-21C513F40803}.Release|Win32.ActiveCfg = Release_Generic_Dll|Win32 + {67CAA87B-7CF1-4F93-BB67-21C513F40803}.Release|Win32.Build.0 = Release_Generic_Dll|Win32 + {9FB32EE1-C45A-4CCD-9AC8-112C43AF80A7}.Debug|Win32.ActiveCfg = Debug|Win32 + {9FB32EE1-C45A-4CCD-9AC8-112C43AF80A7}.Debug|Win32.Build.0 = Debug|Win32 + {9FB32EE1-C45A-4CCD-9AC8-112C43AF80A7}.Release|Win32.ActiveCfg = Release|Win32 + {9FB32EE1-C45A-4CCD-9AC8-112C43AF80A7}.Release|Win32.Build.0 = Release|Win32 + {472481BF-11B6-41A9-BF6A-8BE16A7F8FD6}.Debug|Win32.ActiveCfg = Debug|Win32 + {472481BF-11B6-41A9-BF6A-8BE16A7F8FD6}.Debug|Win32.Build.0 = Debug|Win32 + {472481BF-11B6-41A9-BF6A-8BE16A7F8FD6}.Release|Win32.ActiveCfg = Release|Win32 + {472481BF-11B6-41A9-BF6A-8BE16A7F8FD6}.Release|Win32.Build.0 = Release|Win32 + {245C2785-2FA9-4A6B-8558-35BB8473AEA1}.Debug|Win32.ActiveCfg = Debug|Win32 + {245C2785-2FA9-4A6B-8558-35BB8473AEA1}.Debug|Win32.Build.0 = Debug|Win32 + {245C2785-2FA9-4A6B-8558-35BB8473AEA1}.Release|Win32.ActiveCfg = Release|Win32 + {245C2785-2FA9-4A6B-8558-35BB8473AEA1}.Release|Win32.Build.0 = Release|Win32 + {B086EA3E-700A-4DED-A91D-85ED8A79A8FC}.Debug|Win32.ActiveCfg = Debug|Win32 + {B086EA3E-700A-4DED-A91D-85ED8A79A8FC}.Debug|Win32.Build.0 = Debug|Win32 + {B086EA3E-700A-4DED-A91D-85ED8A79A8FC}.Release|Win32.ActiveCfg = Release|Win32 + {B086EA3E-700A-4DED-A91D-85ED8A79A8FC}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deps/mpg123/ports/MSVC++/2008/mpglib/mpglib.vcproj b/deps/mpg123/ports/MSVC++/2008/mpglib/mpglib.vcproj new file mode 100644 index 0000000..b331f1b --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008/mpglib/mpglib.vcproj @@ -0,0 +1,191 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deps/mpg123/ports/MSVC++/2008/scan/scan.vcproj b/deps/mpg123/ports/MSVC++/2008/scan/scan.vcproj new file mode 100644 index 0000000..e6befe6 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008/scan/scan.vcproj @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deps/mpg123/ports/MSVC++/2008clr/2008clr.sln b/deps/mpg123/ports/MSVC++/2008clr/2008clr.sln new file mode 100644 index 0000000..c5562a5 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/2008clr.sln @@ -0,0 +1,81 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mpg123clr", "mpg123clr\mpg123clr.vcproj", "{99E8B20E-9C29-46BC-B766-A50F237D88BF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "scanclr", "examples\scanclr\scanclr.csproj", "{53664927-0A21-4056-A5D5-C6A1B4B1F839}" + ProjectSection(ProjectDependencies) = postProject + {99E8B20E-9C29-46BC-B766-A50F237D88BF} = {99E8B20E-9C29-46BC-B766-A50F237D88BF} + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "feedseekclr", "examples\feedseekclr\feedseekclr.csproj", "{626B52AB-1E46-46FB-A259-03DCE3994BE6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReplaceReaderclr", "examples\ReplaceReaderclr\ReplaceReaderclr.csproj", "{6415FBC0-44EC-4158-8A24-127D9BAC5CEA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmpg123", "..\2008\libmpg123\libmpg123.vcproj", "{67CAA87B-7CF1-4F93-BB67-21C513F40803}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|Win32 = Debug|Win32 + Release|Any CPU = Release|Any CPU + Release|Mixed Platforms = Release|Mixed Platforms + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {99E8B20E-9C29-46BC-B766-A50F237D88BF}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {99E8B20E-9C29-46BC-B766-A50F237D88BF}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {99E8B20E-9C29-46BC-B766-A50F237D88BF}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {99E8B20E-9C29-46BC-B766-A50F237D88BF}.Debug|Win32.ActiveCfg = Debug|Win32 + {99E8B20E-9C29-46BC-B766-A50F237D88BF}.Debug|Win32.Build.0 = Debug|Win32 + {99E8B20E-9C29-46BC-B766-A50F237D88BF}.Release|Any CPU.ActiveCfg = Release|Win32 + {99E8B20E-9C29-46BC-B766-A50F237D88BF}.Release|Mixed Platforms.ActiveCfg = Release|Win32 + {99E8B20E-9C29-46BC-B766-A50F237D88BF}.Release|Mixed Platforms.Build.0 = Release|Win32 + {99E8B20E-9C29-46BC-B766-A50F237D88BF}.Release|Win32.ActiveCfg = Release|Win32 + {99E8B20E-9C29-46BC-B766-A50F237D88BF}.Release|Win32.Build.0 = Release|Win32 + {53664927-0A21-4056-A5D5-C6A1B4B1F839}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {53664927-0A21-4056-A5D5-C6A1B4B1F839}.Debug|Any CPU.Build.0 = Debug|Any CPU + {53664927-0A21-4056-A5D5-C6A1B4B1F839}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {53664927-0A21-4056-A5D5-C6A1B4B1F839}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {53664927-0A21-4056-A5D5-C6A1B4B1F839}.Debug|Win32.ActiveCfg = Debug|Any CPU + {53664927-0A21-4056-A5D5-C6A1B4B1F839}.Release|Any CPU.ActiveCfg = Release|Any CPU + {53664927-0A21-4056-A5D5-C6A1B4B1F839}.Release|Any CPU.Build.0 = Release|Any CPU + {53664927-0A21-4056-A5D5-C6A1B4B1F839}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {53664927-0A21-4056-A5D5-C6A1B4B1F839}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {53664927-0A21-4056-A5D5-C6A1B4B1F839}.Release|Win32.ActiveCfg = Release|Any CPU + {626B52AB-1E46-46FB-A259-03DCE3994BE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {626B52AB-1E46-46FB-A259-03DCE3994BE6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {626B52AB-1E46-46FB-A259-03DCE3994BE6}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {626B52AB-1E46-46FB-A259-03DCE3994BE6}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {626B52AB-1E46-46FB-A259-03DCE3994BE6}.Debug|Win32.ActiveCfg = Debug|Any CPU + {626B52AB-1E46-46FB-A259-03DCE3994BE6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {626B52AB-1E46-46FB-A259-03DCE3994BE6}.Release|Any CPU.Build.0 = Release|Any CPU + {626B52AB-1E46-46FB-A259-03DCE3994BE6}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {626B52AB-1E46-46FB-A259-03DCE3994BE6}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {626B52AB-1E46-46FB-A259-03DCE3994BE6}.Release|Win32.ActiveCfg = Release|Any CPU + {6415FBC0-44EC-4158-8A24-127D9BAC5CEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6415FBC0-44EC-4158-8A24-127D9BAC5CEA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6415FBC0-44EC-4158-8A24-127D9BAC5CEA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {6415FBC0-44EC-4158-8A24-127D9BAC5CEA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {6415FBC0-44EC-4158-8A24-127D9BAC5CEA}.Debug|Win32.ActiveCfg = Debug|Any CPU + {6415FBC0-44EC-4158-8A24-127D9BAC5CEA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6415FBC0-44EC-4158-8A24-127D9BAC5CEA}.Release|Any CPU.Build.0 = Release|Any CPU + {6415FBC0-44EC-4158-8A24-127D9BAC5CEA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {6415FBC0-44EC-4158-8A24-127D9BAC5CEA}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {6415FBC0-44EC-4158-8A24-127D9BAC5CEA}.Release|Win32.ActiveCfg = Release|Any CPU + {67CAA87B-7CF1-4F93-BB67-21C513F40803}.Debug|Any CPU.ActiveCfg = Debug_x86_Dll_Minimal|Win32 + {67CAA87B-7CF1-4F93-BB67-21C513F40803}.Debug|Mixed Platforms.ActiveCfg = Debug_Generic_Dll|Win32 + {67CAA87B-7CF1-4F93-BB67-21C513F40803}.Debug|Mixed Platforms.Build.0 = Debug_Generic_Dll|Win32 + {67CAA87B-7CF1-4F93-BB67-21C513F40803}.Debug|Win32.ActiveCfg = Debug_x86_Dll_Minimal|Win32 + {67CAA87B-7CF1-4F93-BB67-21C513F40803}.Debug|Win32.Build.0 = Debug_x86_Dll_Minimal|Win32 + {67CAA87B-7CF1-4F93-BB67-21C513F40803}.Release|Any CPU.ActiveCfg = Release_x86_Dll_Minimal|Win32 + {67CAA87B-7CF1-4F93-BB67-21C513F40803}.Release|Mixed Platforms.ActiveCfg = Release_Generic_Dll|Win32 + {67CAA87B-7CF1-4F93-BB67-21C513F40803}.Release|Mixed Platforms.Build.0 = Release_Generic_Dll|Win32 + {67CAA87B-7CF1-4F93-BB67-21C513F40803}.Release|Win32.ActiveCfg = Release_x86_Dll_Minimal|Win32 + {67CAA87B-7CF1-4F93-BB67-21C513F40803}.Release|Win32.Build.0 = Release_x86_Dll_Minimal|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deps/mpg123/ports/MSVC++/2008clr/examples/ReplaceReaderclr/Program.cs b/deps/mpg123/ports/MSVC++/2008clr/examples/ReplaceReaderclr/Program.cs new file mode 100644 index 0000000..1059a9a --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/examples/ReplaceReaderclr/Program.cs @@ -0,0 +1,435 @@ +/* + replacereaderclr: test program for mpg123clr, showing how to use ReplaceReader in a CLR enviro. + copyright 2009 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + + initially written by Malcolm Boczek + + not to be used as an example of good coding practices, note the total absence of error handling!!! +*/ + +/* + 1.9.0.0 24-Sep-09 Function names harmonized with libmpg123 (mb) + 1.12.0.0 14-Apr-10 Added ReplaceReaderHandle sample code (mb) +*/ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +using System.IO; // for ReplaceReaderHandle example +using System.Runtime.InteropServices; // for ReplaceReaderHandle example + +using mpg123clr; + +namespace ReplaceReaderclr +{ + class Program + { + private unsafe static int MyReadFunc(int a, void* b, uint c) + { + // need to call posix read function here... + + // PosixRead is an example, substitute your replacement function here. + int ret = mpg123.PosixRead(a, b, c); + + return ret; + } + + private static int MySeekFunc(int a, int b, int c) + { + // NOTE: Largefile conflict with use of "int" position values. + // Convert to long if off_t is defined as long long + + // need to call posix lseek function here... + + // PosixSeek is an example, substitute your replacement function here. + int ret = mpg123.PosixSeek(a, b, c); + + return ret; + } + + private unsafe static int MyHandleReadFunc(void* a, void* b, uint c) + { + GCHandle gch = GCHandle.FromIntPtr((IntPtr)a); + BinaryReader br = (BinaryReader)gch.Target; + + byte[] buf = br.ReadBytes((int)c); + + // NOTE: no discernible performance difference between Marshal.Copy and ptr++ loop + Marshal.Copy(buf, 0, (IntPtr)b, buf.Length); + +// byte* ptr = (byte*)b; +// for (int i = 0, l = buf.Length; i < l; i++) +// *(ptr++) = buf[i]; + + return buf.Length; + } + + private unsafe static int MyHandleSeekFunc(void* a, int b, int c) + { + // NOTE: Largefile conflict with use of "int" position values. + // Convert to long if off_t is defined as long long + + GCHandle gch = GCHandle.FromIntPtr((IntPtr)a); + BinaryReader br = (BinaryReader)gch.Target; + + return (int)br.BaseStream.Seek(b, (SeekOrigin)c); + } + + private unsafe static void MyHandleCleanFunc(void* a) + { + GCHandle gch = GCHandle.FromIntPtr((IntPtr)a); + BinaryReader br = (BinaryReader)gch.Target; + + br.Close(); + } + + static unsafe void Main(string[] args) + { + if (args.Length == 0) + { + Console.WriteLine("I need a file to work on:\n\nPress any key to exit."); + while (Console.Read() == 0) ; + return; + } + mpg123clr.mpg.ErrorCode err; + + string filename = args[0]; + + err = mpg123.mpg123_init(); + Console.WriteLine("Init:"); + + RunReplaceReaderTest(filename); + RunReplaceReaderHandleTest(filename); + RunFrameByFrameTest(filename); + + Console.WriteLine("\nPress any key to exit:"); + while (Console.Read() == 0) ; + + mpg123.mpg123_exit(); + } + + static unsafe void RunReplaceReaderTest(string filename) + { + mpg123clr.mpg.ErrorCode err; + + mpg123 mp = new mpg123(); + err = mp.mpg123_new(); + + // ReplaceReader example + mpg123clr.mpg123.ReadDelegate rdel = MyReadFunc; + mpg123clr.mpg123.SeekDelegate sdel = MySeekFunc; + err = mp.mpg123_replace_reader(rdel, sdel); + + //err = mp.mpg123_open(args[0]); + err = mp.mpg123_open(filename); + + if (err != mpg123clr.mpg.ErrorCode.ok) + { + Console.WriteLine("Error: " + mp.mpg123_strerror()); + } + else + { + Console.WriteLine("Open:"); + + // Show available decoders + string[] Decoders = mp.mpg123_decoders(); + + if (Decoders.Length > 0) + { + Console.WriteLine("\nDecoders:"); + foreach (string str in Decoders) Console.WriteLine(str); + } + + // Show supported decoders + string[] supDecoders = mp.mpg123_supported_decoders(); + + if (supDecoders.Length > 0) + { + Console.WriteLine("\nSupported Decoders:"); + foreach (string str in supDecoders) Console.WriteLine(str); + } + + // Show actual decoder + Console.WriteLine("\nDecoder: " + mp.mpg123_current_decoder()); + + // Show estimated file length + Console.WriteLine("\nLength Estimate: " + mp.mpg123_length().ToString()); + + // Scan - gets actual details including ID3v2 and Frame offsets + err = mp.mpg123_scan(); + + // Show actual file length + if (err == mpg123clr.mpg.ErrorCode.ok) Console.WriteLine("Length Actual : " + mp.mpg123_length().ToString()); + + // Get ID3 data + mpg123clr.id3.mpg123id3v1 iv1; + mpg123clr.id3.mpg123id3v2 iv2; + err = mp.mpg123_id3(out iv1, out iv2); + + // Show ID3v2 data + Console.WriteLine("\nTitle : " + iv2.title); + Console.WriteLine("Artist : " + iv2.artist); + Console.WriteLine("Album : " + iv2.album); + Console.WriteLine("Comment: " + iv2.comment); + Console.WriteLine("Year : " + iv2.year); + + // Demo seek (back to start of file - note: scan should already have done this) + long pos = mp.mpg123_seek(0, System.IO.SeekOrigin.Begin); + + long[] frameindex; + long step; + err = mp.mpg123_index(out frameindex, out step); + + if (err == mpg123clr.mpg.ErrorCode.ok) + { + Console.WriteLine("\nFrameIndex:"); + foreach (long idx in frameindex) + { + // Console.WriteLine(idx.ToString()); + } + } + + int num; + uint cnt; + IntPtr audio; + + // Walk the file - effectively decode the data without using it... + Console.WriteLine("\nWalking : " + iv2.title); + DateTime dte, dts = DateTime.Now; + + while (err == mpg123clr.mpg.ErrorCode.ok || err == mpg123clr.mpg.ErrorCode.new_format) + { + err = mp.mpg123_decode_frame(out num, out audio, out cnt); + + // do something with "audio" here.... + } + + dte = DateTime.Now; + + TimeSpan ts = dte - dts; + Console.WriteLine("Duration: " + ts.ToString()); + + mp.mpg123_close(); + } + + mp.Dispose(); + } + + static unsafe void RunReplaceReaderHandleTest(string filename) + { + mpg123clr.mpg.ErrorCode err; + + mpg123 mp = new mpg123(); + err = mp.mpg123_new(); + + // ReplaceReader example + mpg123clr.mpg123.ReadHandleDelegate rdel = MyHandleReadFunc; + mpg123clr.mpg123.SeekHandleDelegate sdel = MyHandleSeekFunc; + mpg123clr.mpg123.CleanupHandleDelegate cdel = MyHandleCleanFunc; + err = mp.mpg123_replace_reader_handle(rdel, sdel, cdel); + + //err = mp.mpg123_open(args[0]); + BinaryReader br = new BinaryReader(File.OpenRead(filename)); + + err = mp.mpg123_open_handle(br); + + if (err != mpg123clr.mpg.ErrorCode.ok) + { + Console.WriteLine("Error: " + mp.mpg123_strerror()); + } + else + { + Console.WriteLine("Open:"); + + // Show available decoders + string[] Decoders = mp.mpg123_decoders(); + + if (Decoders.Length > 0) + { + Console.WriteLine("\nDecoders:"); + foreach (string str in Decoders) Console.WriteLine(str); + } + + // Show supported decoders + string[] supDecoders = mp.mpg123_supported_decoders(); + + if (supDecoders.Length > 0) + { + Console.WriteLine("\nSupported Decoders:"); + foreach (string str in supDecoders) Console.WriteLine(str); + } + + // Show actual decoder + Console.WriteLine("\nDecoder: " + mp.mpg123_current_decoder()); + + // Show estimated file length + Console.WriteLine("\nLength Estimate: " + mp.mpg123_length().ToString()); + + // Scan - gets actual details including ID3v2 and Frame offsets + err = mp.mpg123_scan(); + + // Show actual file length + if (err == mpg123clr.mpg.ErrorCode.ok) Console.WriteLine("Length Actual : " + mp.mpg123_length().ToString()); + + // Get ID3 data + mpg123clr.id3.mpg123id3v1 iv1; + mpg123clr.id3.mpg123id3v2 iv2; + err = mp.mpg123_id3(out iv1, out iv2); + + // Show ID3v2 data + Console.WriteLine("\nTitle : " + iv2.title); + Console.WriteLine("Artist : " + iv2.artist); + Console.WriteLine("Album : " + iv2.album); + Console.WriteLine("Comment: " + iv2.comment); + Console.WriteLine("Year : " + iv2.year); + + // Demo seek (back to start of file - note: scan should already have done this) + long pos = mp.mpg123_seek(0, System.IO.SeekOrigin.Begin); + + long[] frameindex; + long step; + err = mp.mpg123_index(out frameindex, out step); + + if (err == mpg123clr.mpg.ErrorCode.ok) + { + Console.WriteLine("\nFrameIndex:"); + foreach (long idx in frameindex) + { + // Console.WriteLine(idx.ToString()); + } + } + + int num; + uint cnt; + IntPtr audio; + + // Walk the file - effectively decode the data without using it... + Console.WriteLine("\nWalking : " + iv2.title); + DateTime dte, dts = DateTime.Now; + + while (err == mpg123clr.mpg.ErrorCode.ok || err == mpg123clr.mpg.ErrorCode.new_format) + { + err = mp.mpg123_decode_frame(out num, out audio, out cnt); + + // do something with "audio" here.... + } + + dte = DateTime.Now; + + TimeSpan ts = dte - dts; + Console.WriteLine("Duration: " + ts.ToString()); + + mp.mpg123_close(); + } + + mp.Dispose(); + + } + + static unsafe void RunFrameByFrameTest(string filename) + { + mpg123clr.mpg.ErrorCode err; + + mpg123 mp = new mpg123(); + err = mp.mpg123_new(); + + err = mp.mpg123_open(filename); + + if (err != mpg123clr.mpg.ErrorCode.ok) + { + Console.WriteLine("Error: " + mp.mpg123_strerror()); + } + else + { + Console.WriteLine("Open:"); + + // Show available decoders + string[] Decoders = mp.mpg123_decoders(); + + if (Decoders.Length > 0) + { + Console.WriteLine("\nDecoders:"); + foreach (string str in Decoders) Console.WriteLine(str); + } + + // Show supported decoders + string[] supDecoders = mp.mpg123_supported_decoders(); + + if (supDecoders.Length > 0) + { + Console.WriteLine("\nSupported Decoders:"); + foreach (string str in supDecoders) Console.WriteLine(str); + } + + // Show actual decoder + Console.WriteLine("\nDecoder: " + mp.mpg123_current_decoder()); + + // Show estimated file length + Console.WriteLine("\nLength Estimate: " + mp.mpg123_length().ToString()); + + // Scan - gets actual details including ID3v2 and Frame offsets + err = mp.mpg123_scan(); + + // Show actual file length + if (err == mpg123clr.mpg.ErrorCode.ok) Console.WriteLine("Length Actual : " + mp.mpg123_length().ToString()); + + // Get ID3 data + mpg123clr.id3.mpg123id3v1 iv1; + mpg123clr.id3.mpg123id3v2 iv2; + err = mp.mpg123_id3(out iv1, out iv2); + + // Show ID3v2 data + Console.WriteLine("\nTitle : " + iv2.title); + Console.WriteLine("Artist : " + iv2.artist); + Console.WriteLine("Album : " + iv2.album); + Console.WriteLine("Comment: " + iv2.comment); + Console.WriteLine("Year : " + iv2.year); + + // Demo seek (back to start of file - note: scan should already have done this) + long pos = mp.mpg123_seek(0, System.IO.SeekOrigin.Begin); + + long[] frameindex; + long step; + err = mp.mpg123_index(out frameindex, out step); + + if (err == mpg123clr.mpg.ErrorCode.ok) + { + Console.WriteLine("\nFrameIndex:"); + foreach (long idx in frameindex) + { + // Console.WriteLine(idx.ToString()); + } + } + + int num; + uint cnt; + IntPtr audio; + + // Walk the file - effectively decode the data without using it... + Console.WriteLine("\nFrame Walking : " + iv2.title); + DateTime dte, dts = DateTime.Now; + + while (err == mpg123clr.mpg.ErrorCode.ok || err == mpg123clr.mpg.ErrorCode.new_format) + { + err = mp.mpg123_framebyframe_decode(out num, out audio, out cnt); + err = mp.mpg123_framebyframe_next(); + + // do something with "audio" here.... + } + + dte = DateTime.Now; + + TimeSpan ts = dte - dts; + Console.WriteLine("Duration: " + ts.ToString()); + + mp.mpg123_close(); + } + + mp.Dispose(); + + } + } +} diff --git a/deps/mpg123/ports/MSVC++/2008clr/examples/ReplaceReaderclr/Properties/AssemblyInfo.cs b/deps/mpg123/ports/MSVC++/2008clr/examples/ReplaceReaderclr/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..3f7d5ef --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/examples/ReplaceReaderclr/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ReplaceReaderclr")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ReplaceReaderclr")] +[assembly: AssemblyCopyright("© mpg123 project 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("c65bdebb-51d7-41ba-875d-b2c938f187fc")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/deps/mpg123/ports/MSVC++/2008clr/examples/ReplaceReaderclr/ReplaceReaderclr.csproj b/deps/mpg123/ports/MSVC++/2008clr/examples/ReplaceReaderclr/ReplaceReaderclr.csproj new file mode 100644 index 0000000..0b858f7 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/examples/ReplaceReaderclr/ReplaceReaderclr.csproj @@ -0,0 +1,72 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {6415FBC0-44EC-4158-8A24-127D9BAC5CEA} + Exe + Properties + ReplaceReaderclr + ReplaceReaderclr + v3.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + true + x86 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + true + x86 + + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + + + + + {99E8B20E-9C29-46BC-B766-A50F237D88BF} + mpg123clr + + + + + + if exist "$(SolutionDir)$(ConfigurationName)\libmpg123.dll" copy /y "$(SolutionDir)$(ConfigurationName)\libmpg123.dll" "$(TargetDir)" + + \ No newline at end of file diff --git a/deps/mpg123/ports/MSVC++/2008clr/examples/feedseekclr/Program.cs b/deps/mpg123/ports/MSVC++/2008clr/examples/feedseekclr/Program.cs new file mode 100644 index 0000000..93e0bf8 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/examples/feedseekclr/Program.cs @@ -0,0 +1,331 @@ +/* + feedseekclr: test program for mpg123clr, showing how to use fuzzy seeking in feeder mode + copyright 2009 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + + based on feedseek.c example for libmpg123. + + Comment (Malcolm Boczek) + this CLR example has been written to allow easy comparison to the original feedseek.c example + and uses some constructs that would not normally be used in a C# environment, + eg: byte[]/ASCII text, Marshal.Copy, static fields, lots of casts etc. +*/ + +/* + 1.9.0.0 24-Sep-09 Function names harmonized with libmpg123 (mb) +*/ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +using System.IO; +using System.Runtime.InteropServices; + +using mpg123clr; + +namespace feedseekclr +{ + class Program + { + const int WAVE_FORMAT_PCM = 0x0001; + const int WAVE_FORMAT_IEEE_FLOAT = 0x0003; + + static BinaryWriter _out; + static long totaloffset, dataoffset; + static int rate; + static mpg123clr.mpg.channelcount channels; + static mpg123clr.mpg.enc enc; + static short bitspersample, wavformat; + + // write wav header + static void initwav() + { + uint tmp32 = 0; + ushort tmp16 = 0; + byte[] rifftxt = new byte[] { (byte)'R', (byte)'I', (byte)'F', (byte)'F' }; + byte[] wavetxt = new byte[] { (byte)'W', (byte)'A', (byte)'V', (byte)'E' }; + byte[] fmttxt = new byte[] { (byte)'f', (byte)'m', (byte)'t', (byte)' ' }; + byte[] datatxt = new byte[] { (byte)'d', (byte)'a', (byte)'t', (byte)'a' }; + + _out.Write(rifftxt); + totaloffset = _out.BaseStream.Position; + + _out.Write(tmp32); // total size + _out.Write(wavetxt); + _out.Write(fmttxt); + + tmp32 = 16; + _out.Write(tmp32); // format length + + tmp16 = (ushort)wavformat; + _out.Write(tmp16); // format + + tmp16 = (ushort)channels; + _out.Write(tmp16); // channels + + tmp32 = (uint)rate; + _out.Write(tmp32); // sample rate + + tmp32 = (uint) (rate * bitspersample / 8 * (int)channels); + _out.Write(tmp32); // bytes / second + + tmp16 = (ushort)(bitspersample / 8 * (int)channels); // float 16 or signed int 16 + _out.Write(tmp16); // block align + + tmp16 = (ushort)bitspersample; + _out.Write(tmp16); // bits per sample + + _out.Write(datatxt); + + tmp32 = 0; + dataoffset = _out.BaseStream.Position; + + _out.Write(tmp32); // data length + + } + + // rewrite wav header with final length infos + static void closewav() + { + uint tmp32 = 0; + // ushort tmp16 = 0; + + int total = (int)_out.BaseStream.Position; + + _out.Seek((int)totaloffset, SeekOrigin.Begin); + tmp32 = (uint)(total - (totaloffset + 4)); + + _out.Write(tmp32); + + _out.Seek((int)dataoffset, SeekOrigin.Begin); + + tmp32 = (uint)(total - (dataoffset + 4)); + + _out.Write(tmp32); + } + + // determine correct wav format and bits per sample + // from mpg123 enc value + static void initwavformat() + { + if ((enc & mpg123clr.mpg.enc.enc_float_64) != 0) + { + bitspersample = 64; + wavformat = WAVE_FORMAT_IEEE_FLOAT; + } + else if ((enc & mpg123clr.mpg.enc.enc_float_32) != 0) + { + bitspersample = 32; + wavformat = WAVE_FORMAT_IEEE_FLOAT; + } + else if ((enc & mpg123clr.mpg.enc.enc_16) != 0) + { + bitspersample = 16; + wavformat = WAVE_FORMAT_PCM; + } + else + { + bitspersample = 8; + wavformat = WAVE_FORMAT_PCM; + } + } + + static void Main(string[] args) + { + const long INBUFF = 16384 * 2 * 2; + + int ret; + mpg123clr.mpg.ErrorCode state; + long inoffset,inc = 0; + long outc = 0; + byte[] buf = new byte[INBUFF]; + + if (args.Length < 2) + { + Console.WriteLine("Please supply in and out filenames\n"); + Console.WriteLine("Press any key to exit:"); + while (Console.Read() == 0) ; + + return; + } + + mpg123clr.mpg.ErrorCode err; + + err = mpg123.mpg123_init(); + + mpg123 mp = new mpg123(); + err = mp.mpg123_new(); + + if (err != mpg123clr.mpg.ErrorCode.ok) + { + Console.WriteLine("Unable to create mpg123 handle: " + mpg123error.mpg123_plain_strerror(err)); + Console.WriteLine("Press any key to exit:"); + while (Console.Read() == 0) ; + + return; + } + + mp.mpg123_param(mpg123clr.mpg.parms.verbose, 4, 0); + + err = mp.mpg123_param(mpg123clr.mpg.parms.flags, + (int) (mpg123clr.mpg.param_flags.fuzzy | + mpg123clr.mpg.param_flags.seekbuffer | + mpg123clr.mpg.param_flags.gapless), 0); + + if (err != mpg123clr.mpg.ErrorCode.ok) + { + Console.WriteLine("Unable to set library options: " + mp.mpg123_strerror()); + Console.WriteLine("Press any key to exit:"); + while (Console.Read() == 0) ; + + return; + } + + // Let the seek index auto-grow and contain an entry for every frame + err = mp.mpg123_param(mpg123clr.mpg.parms.index_size, -1, 0); + + if (err != mpg123clr.mpg.ErrorCode.ok) + { + Console.WriteLine("Unable to set index size: " + mp.mpg123_strerror()); + Console.WriteLine("Press any key to exit:"); + while (Console.Read() == 0) ; + + return; + } + + // Use float output formats only + err = mp.mpg123_format_none(); + + if (err != mpg123clr.mpg.ErrorCode.ok) + { + Console.WriteLine("Unable to disable all output formats: " + mp.mpg123_strerror()); + Console.WriteLine("Press any key to exit:"); + while (Console.Read() == 0) ; + + return; + } + + int[] rates = mp.mpg123_rates(); + foreach (int rate in rates) + { + err = mp.mpg123_format(rate, mpg123clr.mpg.channelcount.both, mpg123clr.mpg.enc.enc_float_32); + + if (err != mpg123clr.mpg.ErrorCode.ok) + { + Console.WriteLine("Unable to set float output formats: " + mp.mpg123_strerror()); + Console.WriteLine("Press any key to exit:"); + while (Console.Read() == 0) ; + + return; + } + } + + err = mp.mpg123_open_feed(); + + if (err != mpg123clr.mpg.ErrorCode.ok) + { + Console.WriteLine("Unable to open feed: " + mp.mpg123_strerror()); + Console.WriteLine("Press any key to exit:"); + while (Console.Read() == 0) ; + + return; + } + + string filename = args[0]; + BinaryReader _in = new BinaryReader(File.Open(filename, FileMode.Open)); + + _out = new BinaryWriter(File.Open(args[1], FileMode.Create)); + + while ((ret = (int)(mp.mpg123_feedseek(95000, SeekOrigin.Begin, out inoffset))) == (int)mpg123clr.mpg.ErrorCode.need_more) // equiv to mpg123_feedseek + { + buf = _in.ReadBytes((int)INBUFF); + + if (buf.Length <= 0) break; + + inc += buf.Length; + + state = mp.mpg123_feed(buf, (uint)buf.Length); + + if (state == mpg123clr.mpg.ErrorCode.err) + { + Console.WriteLine("Feed error: " + mp.mpg123_strerror()); + Console.WriteLine("Press any key to exit:"); + while (Console.Read() == 0) ; + + return; + } + } + + _in.BaseStream.Seek(inoffset, SeekOrigin.Begin); + + while (true) + { + buf = _in.ReadBytes((int)INBUFF); + if (buf.Length <= 0) break; + + inc += buf.Length; + + err = mp.mpg123_feed(buf, (uint)buf.Length); + + int num; + uint bytes; + IntPtr audio; + + while (err != mpg123clr.mpg.ErrorCode.err && err != mpg123clr.mpg.ErrorCode.need_more) + { + err = mp.mpg123_decode_frame(out num, out audio, out bytes); + + if (err == mpg123clr.mpg.ErrorCode.new_format) + { + mp.mpg123_getformat(out rate, out channels, out enc); + + initwavformat(); + initwav(); + } + + // (Surprisingly?) even though it does a Marshal.Copy it's as efficient as the pointer example below!!! + if (bytes > 0) + { + byte[] outbuf = new byte[bytes]; + Marshal.Copy(audio, outbuf, 0, (int)bytes); + + _out.Write(outbuf, 0, (int)bytes); + } + + // Alternative example of direct usage of audio data via pointers - note it needs "unsafe" + // and I'm fairly sure pointers should be "fixed" first + // if (bytes > 0) + // unsafe{ + // byte* p = (byte*)audio; + // for (int ii = 0; ii < bytes; ii++) + // _out.Write(*p++); + // } + + outc += bytes; + } + + if (err == mpg123clr.mpg.ErrorCode.err) + { + Console.WriteLine("Error: " + mp.mpg123_strerror()); + break; + } + + } + + Console.WriteLine("Finished"); + + closewav(); + + _out.Close(); + _in.Close(); + + mp.mpg123_delete(); + mp.Dispose(); + + mpg123.mpg123_exit(); + + } + } +} diff --git a/deps/mpg123/ports/MSVC++/2008clr/examples/feedseekclr/Properties/AssemblyInfo.cs b/deps/mpg123/ports/MSVC++/2008clr/examples/feedseekclr/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..3a54cdd --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/examples/feedseekclr/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("feedseekclr")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("feedseekclr")] +[assembly: AssemblyCopyright("© mpg123 project 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("1fdb46e2-eb93-4e8f-8266-0d386215cc75")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/deps/mpg123/ports/MSVC++/2008clr/examples/feedseekclr/feedseekclr.csproj b/deps/mpg123/ports/MSVC++/2008clr/examples/feedseekclr/feedseekclr.csproj new file mode 100644 index 0000000..603c572 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/examples/feedseekclr/feedseekclr.csproj @@ -0,0 +1,71 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {626B52AB-1E46-46FB-A259-03DCE3994BE6} + Exe + Properties + feedseekclr + feedseekclr + v3.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + x86 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + x86 + + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + + + + + {99E8B20E-9C29-46BC-B766-A50F237D88BF} + mpg123clr + + + + + + if exist "$(SolutionDir)$(ConfigurationName)\libmpg123.dll" copy /y "$(SolutionDir)$(ConfigurationName)\libmpg123.dll" "$(TargetDir)" + + \ No newline at end of file diff --git a/deps/mpg123/ports/MSVC++/2008clr/examples/scanclr/Program.cs b/deps/mpg123/ports/MSVC++/2008clr/examples/scanclr/Program.cs new file mode 100644 index 0000000..52ad856 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/examples/scanclr/Program.cs @@ -0,0 +1,79 @@ +/* + scanclr: Estimate length (sample count) of a mpeg file and compare to length from exact scan. + + copyright 2009 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + + CLR example initially written by Malcolm Boczek + Based on scan.c example initially written by Thomas Orgis +*/ + +/* Note the lack of error checking here. + While it would be nicer to inform the user about troubles, libmpg123 is designed _not_ to bite you on operations with invalid handles , etc. + You just jet invalid results on invalid operations... */ +/* Ditto for mpg123clr (MB) */ + +/* + 1.9.0.0 24-Sep-09 Function names harmonized with libmpg123 (mb) +*/ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +using mpg123clr; + +namespace scanclr +{ + class Program + { + static void Main(string[] args) + { + if (args.Length < 1) + { + Console.WriteLine("\nI will give you the estimated and exact sample lengths of MPEG audio files.\n"); + Console.WriteLine("\nUsage: scanclr \n\n"); + Console.WriteLine("Press any key to exit:"); + while (Console.Read() == 0) ; + + return; + } + + + mpg123clr.mpg.ErrorCode err; + + err = mpg123.mpg123_init(); + + mpg123 mp = new mpg123(); + err = mp.mpg123_new(); + + mp.mpg123_param(mpg123clr.mpg.parms.resync_limit, -1, 0); + + foreach (string name in args) + { + + err = mp.mpg123_open(name); + + long a, b; + + a = mp.mpg123_length(); + + mp.mpg123_scan(); + + b = mp.mpg123_length(); + + mp.mpg123_close(); + + Console.WriteLine(string.Format("File {0}: estimated {1} vs. scanned {2}", name, a, b)); + } + + Console.WriteLine("\nPress any key to exit:"); + while (Console.Read() == 0) ; + + mp.Dispose(); + + mpg123.mpg123_exit(); + } + } +} diff --git a/deps/mpg123/ports/MSVC++/2008clr/examples/scanclr/Properties/AssemblyInfo.cs b/deps/mpg123/ports/MSVC++/2008clr/examples/scanclr/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..d915e84 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/examples/scanclr/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("scanclr")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("scanclr")] +[assembly: AssemblyCopyright("© mpg123 project 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("a22ea83e-2dba-4835-b0d8-cca3f0bc73a8")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/deps/mpg123/ports/MSVC++/2008clr/examples/scanclr/scanclr.csproj b/deps/mpg123/ports/MSVC++/2008clr/examples/scanclr/scanclr.csproj new file mode 100644 index 0000000..ed2d537 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/examples/scanclr/scanclr.csproj @@ -0,0 +1,70 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {53664927-0A21-4056-A5D5-C6A1B4B1F839} + Exe + Properties + scanclr + scanclr + v3.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + x86 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + x86 + + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + + + + + {99E8B20E-9C29-46BC-B766-A50F237D88BF} + mpg123clr + + + + + + if exist "$(SolutionDir)$(ConfigurationName)\libmpg123.dll" copy /y "$(SolutionDir)$(ConfigurationName)\libmpg123.dll" "$(TargetDir)" + + \ No newline at end of file diff --git a/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/AssemblyInfo.cpp b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/AssemblyInfo.cpp new file mode 100644 index 0000000..e8547b6 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/AssemblyInfo.cpp @@ -0,0 +1,76 @@ +/* + mpg123clr: MPEG Audio Decoder library Common Language Runtime version. + + copyright 2009 by Malcolm Boczek - free software under the terms of the LGPL 2.1 + mpg123clr.dll is a derivative work of libmpg123 - all original mpg123 licensing terms apply. + + All rights to this work freely assigned to the mpg123 project. +*/ +/* + libmpg123: MPEG Audio Decoder library + + copyright 1995-2008 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + +*/ +/* + 1.8.1.0 04-Aug-09 Initial release. +*/ + +#include "stdafx.h" + +using namespace System::Reflection; +using namespace System::Runtime::CompilerServices; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly:AssemblyTitleAttribute("mpg123clr.dll")]; +[assembly:AssemblyDescriptionAttribute("mpg123clr Dynamic Link Library")]; +[assembly:AssemblyConfigurationAttribute("")]; +[assembly:AssemblyCompanyAttribute("mpg123 Project")]; +[assembly:AssemblyProductAttribute("mpg123clr.dll")]; +[assembly:AssemblyCopyrightAttribute("© 2009-2011 by the mpg123 project")]; +[assembly:AssemblyTrademarkAttribute("")]; +[assembly:AssemblyCultureAttribute("")]; + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the value or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly:AssemblyVersionAttribute("1.13.0.0")]; + +// +// In order to sign your assembly you must specify a key to use. Refer to the +// Microsoft .NET Framework documentation for more information on assembly signing. +// +// Use the attributes below to control which key is used for signing. +// +// Notes: +// (*) If no key is specified, the assembly is not signed. +// (*) KeyName refers to a key that has been installed in the Crypto Service +// Provider (CSP) on your machine. KeyFile refers to a file which contains +// a key. +// (*) If the KeyFile and the KeyName values are both specified, the +// following processing occurs: +// (1) If the KeyName can be found in the CSP, that key is used. +// (2) If the KeyName does not exist and the KeyFile does exist, the key +// in the KeyFile is installed into the CSP and used. +// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. +// When specifying the KeyFile, the location of the KeyFile should be +// relative to the project directory. +// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework +// documentation for more information on this. +// +[assembly:AssemblyDelaySignAttribute(false)]; +[assembly:AssemblyKeyFileAttribute("")]; +[assembly:AssemblyKeyNameAttribute("")]; diff --git a/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/ReadMe.txt b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/ReadMe.txt new file mode 100644 index 0000000..f6010d4 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/ReadMe.txt @@ -0,0 +1,165 @@ +======================================================================== + DYNAMIC LINK LIBRARY : mpg123clr Project Overview +======================================================================== + +Project Installation: + +The project is part of a Visual Studio 2008 Solution. + +The Visual Studio solution file is 2008clr.sln located in a folder/directory named 2008clr. + +This folder/directory should be located in the mpg123/ports/MSVC++ folder to maintain file relationships +with required mpg123 library files. i.e. at mpg123/ports/MSVC++/2008clr. + +The solution includes the following projects: + + mpg123clr The mpg123 CLR project. This creates the CLR compatible DLL file. + scanclr Demonstration project for comparison with scan.c example. + feedseekclr Demonstration project for comparison with feedseek.c example + replacereaderclr Demonstration project, how to implement ReplaceReader in CLR (proof of concept) + libmpg123 For convenience, ensures that libmpg123.lib is available for linking + +========================================================================= +Compiling: +Configuration Manager: + +mpg123clr requires linking to a libmpg123 static library, this library must be compiled prior to +compiling the clr projects. mpg123clr uses relative folder position during linking; therefore either:- + + ensure that the 2008clr solution is correctly located within the ports\msvc++ folder, or + change the "linker->input->additional dependencies" to suit your installation configuration + +NOTE: x64 Active Solution Platform configurations are not supplied with this solution but have been tested. +(Effectively all that is required is to change all "include" references to account for the "x64" output locations) + +NOTE: The "unsafe" context of the ReplaceReaderClr project is only required to allow the use of callbacks. +mpg123clr is written to avoid the use of "unsafe" for the majority of normal operations. + + +========================================================================== +Using mpg123clr: + +Mpg123clr is a CLR ready dll. Simply add a reference to the mpg123clr.dll file in your application project. + +You may also add a "using" directive in your program files. C# e.g. using mpg123clr; + +The mpg123clr project is configured to create an additional Intellisense documentation file (mpg123clr.xml) +to assist usage. If you manually relocate the .dll please also copy the .xml file to ensure correct Intellisense +operation. + +=========================================================================== +Common Errors: + +1) Problem: "Unhandled Exception - file not found" error when the application is executed. + Cause: Incorrect libmpg123 library build / missing libmpg123.dll. + Solution: Copy libmpg123.dll to the application output folder - possibly in a Post-Build Event (see scanclr for + an example). + Explanation: mpg123clr requires static library libmpg123.lib and NOT dynamic library libmpg123.dll. + If the libmpg123 library is built using an incorrect Project Context (such as Debug_Generic_Dll), mpg123clr + will attempt to load the libmpg123.dll at runtime even though this file is not required. + Alternatively: Use Configuration Manager and select a non-dll build context for the libmpg123 project. + (i.e. Debug_Generic not Debug_Generic_Dll) + +=========================================================================== +Developer Notes: + + 1) Documentation do not appear in CLR Intellisense environment (at time of writing). + So deferred in favour of within . + 2) During development "off_t" parameters conflicted with intellisense (although size_t worked just fine) + Since many CLR functions that refer to off_t features (e.g. positioners) actually expect 64bit long + (or long long in C++) parameters, I've implemented off_t as a long long - with one notable exception. + This fixed intellisense and accommodates the CLR 64bit long implementation positioners: And then intellisense + started working correctly and made this a moot point - at least as far as intellisense is concerned. + 3) off_t notable exception - SeekDelegate, SeekHandleDelegate + Usually 2008clr functions are called by the callee, long long (clr 64bit long) can be marshaled and passed + to libmpg123. The seek delegate is called directly by the libmpg123 seek functions - there isn't an opportunity + to marshal the offending parameters. A library compiled in 32 bit will expect the SeekDelegate to have a 32bit + position parameter but in 64bit compilation the same parameter will be 64bit. Therefore the need to be correct + overrides the need for consistency with CLR 64bit positioners. + SIDE NOTE: In early tests the SeekDelegate was defined with a long long parameter - libmpg123 called it oblivious + to the fact that the type was incorrect. The only impact was that the 32bit position and 32bit origin (whence) + were compacted to a single 64bit parameter. This is fixed, no longer an issue!!! +4) PosixSeek and PosixRead ARE ONLY INCLUDED AS PROOF OF CONCEPT - to prove that the callbacks into CLR would + function correctly with libmpg123 cdecl calls. It saved making a separate dll for the posix elements. + REPEAT AFTER ME: Not for normal consumption.... +5) The __clrcall decoration of mpg123clr functions is not strictly necessary for Visual Studio 2005 and later, + but has been left in for compatibility with earlier versions. See MS documentation of "double thunking" +6) Many functions use pin_ptr to pin the return variables prior to calling the libmpg123 function, this was + considered as an alternative to avoid the use of local variables with attendant overhead of + allocate/use/copy/destroy etc. In practice pin_ptr has significant overhead, empirical tests showed very + little performance difference between either method. +7) Set pin_ptr to NULL after use, to force early GC (recommended). Carried out performance trials and found + insignificant impact. Since most functions are likely to be used repeatedly decided to follow recommended usage. + If code analysis proves this to be redundant - can be removed... + (1.9.0.1 update) "insignificant" in Debug mode, quite significant if the debug overhead is removed, + i.e. Release mode. So try/finally blocks removed in favour of allocating temporary local return variable. +8) (1.12.0.0 update) Support for mpg123_open_handle warrants further description... here it is. + a) Pinning of delegates is not required. See Microsoft: C++, How to: Marshal Callbacks and Delegates Using C++ Interop + b) Pinning of objects is an entirely different matter, so why is the open_handle object not pinned? + Answer: Because it's an object. I allowed passing of any object not just handles. + i) a pin_ptr cannot be a field member for instance scope. + ii) cannot pin the object itself because there's no object.field to pin + iii) cannot pin the object target because the referenced object may be unblittable. + iv) GCHandle.Alloc(obj, GCHandleType.Pinned) doesn't work on unblittable objects (eg managed references like BinaryReader) + Since I don't restrict which objects may be passed I'm forced to exclude pinning. + c) The generated handle doesn't need to be pinned. GCHandle.Alloc(obj) creates a potentially GC relocatable object + containing a Handle to the object. The GCHandle.ToIntPtr(userObjectHandle) creates an integer representation of the + handle that is valid irrespective of any GC relocation of either the object or the GCHandle and can therefore be + passed through unmanaged code to CLR native methods that can re-reference the original object via GCHandle.FromIntPtr + and gch.Target. + All this seems relatively efficient, certainly there is little performance difference between the ReplaceReader + and ReplaceReaderHandle sample code. + +============================================================================= +Tested/Untested + +I haven't used mpg123clr in a production project yet, although one is about to start. Therefore EVERYTHING should +be treated as though unproven. UPDATE: the scanclr, feedseekclr and replacereaderclr examples have provided a basic +functional test. + +Largefile support totally untested... would appreciate a volunteer. + +The majority of functions have been tried in test projects with the following exceptions. + +64bit compilation. mpg123clr compiles correctly in 64bit x64 platform mode, but hasn't been tested. + +ICY(icy_meta); Never had genuine ICY data to test with. +Icy2Utf8(icy_text); Never tried. Please provide sample material. +enc_from_id3(encbyte); Works on libmpg123 enums, never had real world text samples. +store_utf8(...); Works with CLR generated text, not tried with real world text samples. +mpg123str.strlen(...) Not tested with utf8 text strings. Please provide sample material. + +============================================================================== +Documentation + +mpg123clr is 90% documentation, use intellisense as your reference. If in doubt refer back to the libmpg123 +documents. NOTE: You need to build the mpg123clr library to create the intellisense file. + +=============================================================================== +Error Trapping + +libmpg123 is an error agnostic library - it shouldn't generate errors, but neither does it trap them. + +mpg123clr is built on the same concept although some CLR generated errors have been trapped. My personal +preference is that exceptions should be avoided not relied on... + +THE CALLING APPLICATION IS RESPONSIBLE FOR ERROR DETECTION, TRAPPING AND CORRECTION. + +All projects are "as is" with no express or implied warranty. Demonstration projects are to demonstrate the +use of the library and are NOT considered examples of good coding practice. Use at own risk. + +=============================================================================== +Revision History + + 1.8.1.0 04-Aug-09 Initial release. + 1.9.0.0 24-Sep-09 Function names harmonized with libmpg123 (mb) + 1.9.0.0 30-Sep-09 Project config - if exists, copy libmpg123.dll to app output folder (mb) + 1.9.0.0 01-Oct-09 Technical cleanup - subst nullptr for NULL (mb) + 1.9.0.1 24-Nov-09 Performance update - removed try/finally (mb) + 1.12.0.0 14-Apr-10 Release match - added open_handle and framebyframe support (mb) + 1.13.0.0 13-Jan-11 Release match - added encsize and strlen support (mb) + +Constructive feedback preferred. + +Malcolm Boczek +mpg123clr original author. diff --git a/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/advanced.cpp b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/advanced.cpp new file mode 100644 index 0000000..ef9ebdf --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/advanced.cpp @@ -0,0 +1,91 @@ +/* + mpg123clr: MPEG Audio Decoder library Common Language Runtime version. + + copyright 2009 by Malcolm Boczek - free software under the terms of the LGPL 2.1 + mpg123clr.dll is a derivative work of libmpg123 - all original mpg123 licensing terms apply. + + All rights to this work freely assigned to the mpg123 project. +*/ +/* + libmpg123: MPEG Audio Decoder library + + copyright 1995-2008 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + +*/ +/* + 1.8.1.0 04-Aug-09 Initial release. + 1.9.0.0 24-Sep-09 Function names harmonized with libmpg123 (mb) + 1.9.0.0 13-Oct-09 pin_ptr = nullptr on return (mb) + 1.9.0.1 24-Nov-09 performance update - removed try/finally (mb) +*/ + +#include "StdAfx.h" +#include "advanced.h" + +mpg123clr::advpars::advpars(int% error) +{ + pin_ptr err = &error; + mp = ::mpg123_new_pars(err); + + err = nullptr; +} + +mpg123clr::advpars::~advpars(void) +{ + // clean up code to release managed resources + // ... + + // call Finalizer to clean up unmanaged resources + this->!advpars(); +} + +mpg123clr::advpars::!advpars(void) +{ + if (mp != NULL) + { + ::mpg123_delete_pars(mp); + mp = NULL; + } +} + +mpg123clr::mpg::ErrorCode mpg123clr::advpars::mpg123_fmt_none(void) +{ + return (mpg123clr::mpg::ErrorCode) ::mpg123_fmt_none(mp); +} + +mpg123clr::mpg::ErrorCode mpg123clr::advpars::mpg123_fmt_all(void) +{ + return (mpg123clr::mpg::ErrorCode) ::mpg123_fmt_all(mp); +} + +mpg123clr::mpg::ErrorCode mpg123clr::advpars::mpg123_fmt(int rate, mpg123clr::mpg::channelcount channels, int encodings) +{ + return (mpg123clr::mpg::ErrorCode) ::mpg123_fmt(mp, rate, (int)channels, encodings); +} + +mpg123clr::mpg::channelcount mpg123clr::advpars::mpg123_fmt_support(int rate, int encodings) +{ + return (mpg123clr::mpg::channelcount) ::mpg123_fmt_support(mp, rate, encodings); +} + +mpg123clr::mpg::ErrorCode mpg123clr::advpars::mpg123_par(mpg123clr::mpg::parms type, int val, double fval) +{ + return (mpg123clr::mpg::ErrorCode) ::mpg123_par(mp, (mpg123_parms) type, val, fval); +} + +mpg123clr::mpg::ErrorCode mpg123clr::advpars::mpg123_getpar(mpg123clr::mpg::parms type, [Out] int% val, [Out] double% fval) +{ + // Avoid need for local intermediary variables + pin_ptr _val = &val; + pin_ptr _fval = &fval; + + int ret = ::mpg123_getpar(mp, (mpg123_parms) type, (long*)_val, _fval); + + _fval = nullptr; + _val = nullptr; + + return (mpg123clr::mpg::ErrorCode) ret; +} + + diff --git a/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/advanced.h b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/advanced.h new file mode 100644 index 0000000..0bbd4a8 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/advanced.h @@ -0,0 +1,130 @@ +/* + mpg123clr: MPEG Audio Decoder library Common Language Runtime version. + + copyright 2009 by Malcolm Boczek - free software under the terms of the LGPL 2.1 + mpg123clr.dll is a derivative work of libmpg123 - all original mpg123 licensing terms apply. + + All rights to this work freely assigned to the mpg123 project. +*/ +/* + libmpg123: MPEG Audio Decoder library + + copyright 1995-2008 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + +*/ +/* + 1.8.1.0 04-Aug-09 Initial release. + 1.9.0.0 24-Sep-09 Function names harmonized with libmpg123 (mb) +*/ + +#pragma once + +#pragma warning(disable : 4635) +#include "mpg123.h" +#pragma warning(default : 4635) + +#include "enum.h" +#include "error.h" + +using namespace System; +using namespace System::Runtime::InteropServices; + +namespace mpg123clr +{ + // Recommended usage when creating reference type on the managed heap (not using stack semantics + // for reference types...) [see (Microsoft) Destructors and Finalizers in Visual C++] + // + // C++/CLI + // A myA; + // // use myA here + // + // Equivalent user code: + // + // A ^ myA = gcnew A; + // try { /* use myA here */ } finally { delete myA; } + // + // + // C# (from wikipedia) + // using(A myA = new A()) { /* Use myA here */ } + // Compiler calls myA.Dispose(), in a "finally" of a "try/finally" block + // + // Equivalent user code: + // + // A myA = new myA(); + // try { /* Use myA here */ } finally { myA.Dispose(); } + // + // Otherwise Finalizer will be nondeterministically called by GC + + + /// CLR wrapper for mpg123_pars object. + public ref class advpars + { + protected public: + mpg123_pars* mp; + + protected: + !advpars(void); + + public: + ///Constructor. + ///Returns MPG123_OK or mpg123 error code. + advpars([Out] int% error); + + ///Destructor. + ~advpars(void); + + ///Configure mpg123 parameters to accept no output formats. + ///Use to clear default parameters prior to applying specific settings. + ///Returns MPG123 error codes. + /// + ///MPG123 error codes. + mpg123clr::mpg::ErrorCode __clrcall mpg123_fmt_none(void); + + ///Configure mpg123 parameters to accept all formats including custom rate you may set - this is the default. + ///Returns MPG123 error codes. + /// + ///MPG123 error codes. + mpg123clr::mpg::ErrorCode __clrcall mpg123_fmt_all(void); + + ///Configure detailed output formats. + ///Returns MPG123 error codes. + /// + ///Sample rate (Hertz) + ///Combination of channelcount.stereo and channelcount.mono + ///Combination of accepted encodings for rate and channels e.g. enc.enc_signed16 | enc.enc_ulaw_8 (or 0 for none) + ///MPG123 error codes. + /// VERSION CHECK: long as int for Intellisense + mpg123clr::mpg::ErrorCode __clrcall mpg123_fmt(int rate, mpg123clr::mpg::channelcount channels, int encodings); + + ///Get available support for supplied rate and encoding. + ///Returns 0 for no support (includes invalid parameters), or combination of channelcount.stereo and channelcount.mono. + /// + ///Sample rate (Hertz) + ///Combination of accepted encodings for rate and channels e.g. enc.enc_signed16 | enc.enc_ulaw_8 (or 0 for none) + ///Returns 0 for no support (includes invalid parameters), or combination of channelcount.stereo and channelcount.mono. + /// VERSION CHECK: long as int for Intellisense + mpg123clr::mpg::channelcount __clrcall mpg123_fmt_support(int rate, int encoding); + + ///Set a specific advpars value. + ///Returns MPG123 error codes. + /// + ///Specifies the advpars parameter to be set. + ///The integer value to be applied. + ///The real value to be applied. + ///MPG123 error codes. + /// VERSION CHECK: long as int for Intellisense + mpg123clr::mpg::ErrorCode __clrcall mpg123_par(mpg123clr::mpg::parms type, int val, double fval); + + ///Get a specific advpars value. + ///Returns MPG123 error codes. + /// + ///Specifies the advpars parameter to be returned. + ///Returns the applicable integer value. + ///Returns the applicable real value. + ///MPG123 error codes. + /// VERSION CHECK: long as int for Intellisense + mpg123clr::mpg::ErrorCode __clrcall mpg123_getpar(mpg123clr::mpg::parms type, [Out] int% val, [Out] double% fval); + }; + +} \ No newline at end of file diff --git a/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/dllmain.cpp b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/dllmain.cpp new file mode 100644 index 0000000..8a4edd3 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/dllmain.cpp @@ -0,0 +1,19 @@ +// dllmain.cpp : Defines the entry point for the DLL application. +#include "stdafx.h" + +BOOL APIENTRY DllMain( HMODULE hModule, + DWORD ul_reason_for_call, + LPVOID lpReserved + ) +{ + switch (ul_reason_for_call) + { + case DLL_PROCESS_ATTACH: + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: + case DLL_PROCESS_DETACH: + break; + } + return TRUE; +} + diff --git a/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/enum.h b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/enum.h new file mode 100644 index 0000000..a3c251a --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/enum.h @@ -0,0 +1,218 @@ +/* + mpg123clr: MPEG Audio Decoder library Common Language Runtime version. + + copyright 2009 by Malcolm Boczek - free software under the terms of the LGPL 2.1 + mpg123clr.dll is a derivative work of libmpg123 - all original mpg123 licensing terms apply. + + All rights to this work freely assigned to the mpg123 project. +*/ +/* + libmpg123: MPEG Audio Decoder library + + copyright 1995-2011 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + +*/ +/* + 1.8.1.0 04-Aug-09 Initial release. + 1.10.0.0 30-Nov-09 release match - added mpg123_feature (mb) + 1.13.0.0 13-Jan-11 release match (mb) +*/ + +#pragma once + +#pragma warning(disable : 4635) +#include "mpg123.h" +#pragma warning(default : 4635) + + +namespace mpg123clr +{ + ///Mpg123 enumerations. + namespace mpg + { + + ///Enumeration of the parameters types that it is possible to set/get. + public enum class parms + { + verbose = MPG123_VERBOSE, /// set verbosity value for enabling messages to stderr, >= 0 makes sense (integer) + flags = MPG123_FLAGS, /// set all flags, p.ex val = MPG123_GAPLESS|MPG123_MONO_MIX (integer) + add_flags = MPG123_ADD_FLAGS, /// add some flags (integer) + force_rate = MPG123_FORCE_RATE, /// when value > 0, force output rate to that value (integer) + down_sample = MPG123_DOWN_SAMPLE, /// 0=native rate, 1=half rate, 2=quarter rate (integer) + rva = MPG123_RVA, /// one of the RVA choices above (integer) + downspeed = MPG123_DOWNSPEED, /// play a frame N times (integer) + upspeed = MPG123_UPSPEED, /// play every Nth frame (integer) + start_frame = MPG123_START_FRAME, /// start with this frame (skip frames before that, integer) + decode_frames = MPG123_DECODE_FRAMES, /// decode only this number of frames (integer) + icy_interval = MPG123_ICY_INTERVAL, /// stream contains ICY metadata with this interval (integer) + outscale = MPG123_OUTSCALE, /// the scale for output samples (amplitude - integer or float according to mpg123 output format, normally integer) + timeout = MPG123_TIMEOUT, /// timeout for reading from a stream (not supported on win32, integer) + remove_flags = MPG123_REMOVE_FLAGS, /// remove some flags (inverse of MPG123_ADD_FLAGS, integer) + resync_limit = MPG123_RESYNC_LIMIT, /// Try resync on frame parsing for that many bytes or until end of stream (<0 ... integer). + index_size = MPG123_INDEX_SIZE, /// Set the frame index size (if supported). Values <0 mean that the index is allowed to grow dynamically in these steps (in positive direction, of course) -- Use this when you really want a full index with every individual frame. + preframes = MPG123_PREFRAMES /// Decode/ignore that many frames in advance for layer 3. This is needed to fill bit reservoir after seeking, for example (but also at least one frame in advance is needed to have all "normal" data for layer 3). Give a positive integer value, please. + + }; + + + ///Parameter flag bits. + ///Equivalent to MPG123_FLAGS, use the usual binary or ( | ) to combine. + public enum class param_flags + { + force_mono = MPG123_FORCE_MONO, /// 0111 Force some mono mode: This is a test bitmask for seeing if any mono forcing is active. + mono_left = MPG123_MONO_LEFT, /// 0001 Force playback of left channel only. + mono_right = MPG123_MONO_RIGHT, /// 0010 Force playback of right channel only. + mono_mix = MPG123_MONO_MIX, /// 0100 Force playback of mixed mono. + force_stereo = MPG123_FORCE_STEREO, /// 1000 Force stereo output. + force_8bit = MPG123_FORCE_8BIT, /// 00010000 Force 8bit formats. + quiet = MPG123_QUIET, /// 00100000 Suppress any printouts (overrules verbose). + gapless = MPG123_GAPLESS, /// 01000000 Enable gapless decoding (default on if libmpg123 has support). + no_resync = MPG123_NO_RESYNC, /// 10000000 Disable resync stream after error. + seekbuffer = MPG123_SEEKBUFFER, /// 000100000000 Enable small buffer on non-seekable streams to allow some peek-ahead (for better MPEG sync). + fuzzy = MPG123_FUZZY, /// 001000000000 Enable fuzzy seeks (guessing byte offsets or using approximate seek points from Xing TOC) + force_float = MPG123_FORCE_FLOAT, /// 010000000000 Force floating point output (32 or 64 bits depends on mpg123 internal precision). + + ///Prevent ID3 text translation to UTF-8. + ///NOTE: Do not set if you intend to use CLR id3v2 objects. + /// + plain_id3text = MPG123_PLAIN_ID3TEXT, /// 100000000000 Do not translate ID3 text data to UTF-8. ID3 strings will contain the raw text data, with the first byte containing the ID3 encoding code. + + ignore_streamlength = MPG123_IGNORE_STREAMLENGTH, /// 1000000000000 Ignore any stream length information contained in the stream, which can be contained in a 'TLEN' frame of an ID3v2 tag or a Xing tag. + + // 1.13.0.0 + skip_id3v2 = MPG123_SKIP_ID3V2, /// 10 0000 0000 0000 Do not parse ID3v2 tags, just skip them. + }; + + ///RVA enumeration. + ///Equivalent to MPG123_RVA. + public enum class rva + { + rva_off = MPG123_RVA_OFF, /// RVA disabled (default). + rva_mix = MPG123_RVA_MIX, /// Use mix/track/radio gain. + rva_album = MPG123_RVA_ALBUM, /// Use album/audiophile gain + rva_max = MPG123_RVA_ALBUM, /// The maximum RVA code, may increase in future. + }; + + ///Feature set available for query with mpg123_feature. + ///Equivalent to MPG123_FEATURE_SET. + public enum class feature_set + { + feature_abi_utf8open = MPG123_FEATURE_ABI_UTF8OPEN, /// mpg123 expects path names to be given in UTF-8 encoding instead of plain native. + feature_output_8bit = MPG123_FEATURE_OUTPUT_8BIT, /// 8bit output + feature_output_16bit = MPG123_FEATURE_OUTPUT_16BIT, /// 16bit output + feature_output_32bit = MPG123_FEATURE_OUTPUT_32BIT, /// 32bit output + feature_index = MPG123_FEATURE_INDEX, /// support for building a frame index for accurate seeking + feature_parse_id3v2 = MPG123_FEATURE_PARSE_ID3V2, /// id3v2 parsing + feature_decode_layer1 = MPG123_FEATURE_DECODE_LAYER1, /// mpeg layer-1 decoder enabled + feature_decode_layer2 = MPG123_FEATURE_DECODE_LAYER2, /// mpeg layer-2 decoder enabled + feature_decode_layer3 = MPG123_FEATURE_DECODE_LAYER3, /// mpeg layer-3 decoder enabled + feature_decode_accurate = MPG123_FEATURE_DECODE_ACCURATE, /// accurate decoder rounding + feature_decode_downsample = MPG123_FEATURE_DECODE_DOWNSAMPLE, /// downsample (sample omit) + feature_decode_ntom = MPG123_FEATURE_DECODE_NTOM, /// flexible rate decoding + feature_parse_icy = MPG123_FEATURE_PARSE_ICY, /// ICY support + feature_timeout_read = MPG123_FEATURE_TIMEOUT_READ, /// Reader with timeout (network) + }; + + + + ///An enum over all sample types possibly known to mpg123. + ///The values are designed as bit flags to allow bitmasking for encoding families. + /// + ///Note that (your build of) libmpg123 does not necessarily support all these. + /// Usually, you can expect the 8bit encodings and signed 16 bit. + /// Also 32bit float will be usual beginning with mpg123-1.7.0 . + /// + ///What you should bear in mind is that (SSE, etc) optimized routines may be absent + /// for some formats. We do have SSE for 16, 32 bit and float, though. + /// 24 bit integer is done via postprocessing of 32 bit output -- just cutting + /// the last byte, no rounding, even. If you want better, do it yourself. + /// + ///All formats are in native byte order. On a little endian machine this should mean + /// that you can just feed the MPG123_ENC_SIGNED_32 data to common 24bit hardware that + /// ignores the lowest byte (or you could choose to do rounding with these lower bits). + /// + public enum class enc + { + enc_8 = MPG123_ENC_8, /// 0000 0000 1111 Some 8 bit integer encoding. + enc_16 = MPG123_ENC_16, /// 0000 0100 0000 Some 16 bit integer encoding. + enc_24 = MPG123_ENC_24, /// 0100 0000 0000 0000 Some 24 bit integer encoding. (r1.13) + enc_32 = MPG123_ENC_32, /// 0001 0000 0000 Some 32 bit integer encoding. + enc_signed = MPG123_ENC_SIGNED, /// 0000 1000 0000 Some signed integer encoding. + enc_float = MPG123_ENC_FLOAT, /// 1110 0000 0000 Some float encoding. + enc_signed_16 = MPG123_ENC_SIGNED_16, /// 1101 0000 signed 16 bit + enc_unsigned_16 = MPG123_ENC_UNSIGNED_16, /// 0110 0000 unsigned 16 bit + enc_unsigned_8 = MPG123_ENC_UNSIGNED_8, /// 0000 0001 unsigned 8 bit + enc_signed_8 = MPG123_ENC_SIGNED_8, /// 1000 0010 signed 8 bit + enc_ulaw_8 = MPG123_ENC_ULAW_8, /// 0000 0100 ulaw 8 bit + enc_alaw_8 = MPG123_ENC_ALAW_8, /// 0000 1000 alaw 8 bit + enc_signed_32 = MPG123_ENC_SIGNED_32, /// 0001 0001 1000 0000 signed 32 bit + enc_unsigned_32 = MPG123_ENC_UNSIGNED_32, /// 0010 0001 0000 0000 unsigned 32 bit + enc_signed_24 = MPG123_ENC_SIGNED_24, /// 0101 0000 1000 0000 signed 24 bit (r1.13) + enc_unsigned_24 = MPG123_ENC_UNSIGNED_24, /// 0110 0000 0000 0000 unsigned 24 bit (r1.13) + enc_float_32 = MPG123_ENC_FLOAT_32, /// 0010 0000 0000 32bit float + enc_float_64 = MPG123_ENC_FLOAT_64, /// 0100 0000 0000 64bit float + enc_any = MPG123_ENC_ANY, /// any encoding + }; + + + ///Channel count enumeration + ///clr added both + public enum class channelcount + { + mono = MPG123_MONO, + stereo = MPG123_STEREO, + both = MPG123_MONO | MPG123_STEREO, + }; + + ///Channel enumeration. + public enum class channels + { + left = MPG123_LEFT, /// The Left Channel. + right = MPG123_RIGHT, /// The Right Channel. + both = MPG123_LR, /// Both left and right channel; same as MPG123_LEFT|MPG123_RIGHT + }; + + ///VBR enumeration. + public enum class mpeg_vbr + { + cbr = MPG123_CBR, /// Constant Bitrate Mode (default) + vbr = MPG123_VBR, /// Variable Bitrate Mode + abr = MPG123_ABR, /// Average Bitrate Mode + }; + + ///MPEG Version enumeration. + public enum class mpeg_version + { + mpeg_1_0 = MPG123_1_0, /// MPEG Version 1.0 + mpeg_2_0 = MPG123_2_0, /// MPEG Version 2.0 + mpeg_2_5 = MPG123_2_5, /// MPEG Version 2.5 + }; + + ///MPEG Mode enumeration. + public enum class mpeg_mode + { + m_stereo = MPG123_M_STEREO, /// Standard Stereo. + m_joint = MPG123_M_JOINT, /// Joint Stereo. + m_dual = MPG123_M_DUAL, /// Dual Channel. + m_mono = MPG123_M_MONO, /// Single Channel. + }; + + ///MPEG Flags enumeration. + public enum class mpeg_flags + { + CRC = MPG123_CRC, /// The bitstream is error protected using 16-bit CRC. + COPYRIGHT = MPG123_COPYRIGHT, /// The bitstream is copyrighted. + PRIVATE = MPG123_PRIVATE, /// The private bit has been set. + ORIGINAL = MPG123_ORIGINAL, /// The bitstream is an original, not a copy. + }; + + ///Positional state. + public enum class state + { + accurate = MPG123_ACCURATE /// Query if positons are currently accurate (integer value, 0 if false, 1 if true) + }; + + + } +} \ No newline at end of file diff --git a/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/error.cpp b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/error.cpp new file mode 100644 index 0000000..aeb964e --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/error.cpp @@ -0,0 +1,48 @@ +/* + mpg123clr: MPEG Audio Decoder library Common Language Runtime version. + + copyright 2009 by Malcolm Boczek - free software under the terms of the LGPL 2.1 + mpg123clr.dll is a derivative work of libmpg123 - all original mpg123 licensing terms apply. + + All rights to this work freely assigned to the mpg123 project. +*/ +/* + libmpg123: MPEG Audio Decoder library + + copyright 1995-2008 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + +*/ +/* + 1.8.1.0 04-Aug-09 Initial release. + 1.9.0.0 24-Sep-09 Function names harmonized with libmpg123 (mb) +*/ + +#include "StdAfx.h" +#include "error.h" + +mpg123clr::mpg123error::mpg123error(void) +{ +} + +// Destructor cleans up all resources +mpg123clr::mpg123error::~mpg123error(void) +{ + // clean up code to release managed resources + // ... + + // call Finalizer to clean up unmanaged resources + this->!mpg123error(); +} + +// Finalizer cleans up unmanaged resources +mpg123clr::mpg123error::!mpg123error(void) +{ + // none! +} + +String^ mpg123clr::mpg123error::mpg123_plain_strerror(mpg123clr::mpg::ErrorCode errcode) +{ + return gcnew String(::mpg123_plain_strerror((int)errcode)); +} + diff --git a/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/error.h b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/error.h new file mode 100644 index 0000000..c20976f --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/error.h @@ -0,0 +1,134 @@ +/* + mpg123clr: MPEG Audio Decoder library Common Language Runtime version. + + copyright 2009 by Malcolm Boczek - free software under the terms of the LGPL 2.1 + mpg123clr.dll is a derivative work of libmpg123 - all original mpg123 licensing terms apply. + + All rights to this work freely assigned to the mpg123 project. +*/ +/* + libmpg123: MPEG Audio Decoder library + + copyright 1995-2008 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + +*/ +/* + 1.8.1.0 04-Aug-09 Initial release. + 1.9.0.0 24-Sep-09 Function names harmonized with libmpg123 (mb) + 1.12.0.0 14-Apr-10 Revision harmonization (catch-up) +*/ + +#pragma once + +#pragma warning(disable : 4635) +#include "mpg123.h" +#pragma warning(default : 4635) + +#include "enum.h" + +using namespace System; + +namespace mpg123clr +{ + // defgroup mpg123_error mpg123 error handling + // + // Functions to get text version of the error numbers and an enumeration + // of the error codes returned by libmpg123. + // + // Most functions operating on a mpg123_handle simply return MPG123_OK on success and MPG123_ERR on failure (setting the internal error variable of the handle to the specific error code). + // Decoding/seek functions may also return message codes MPG123_DONE, MPG123_NEW_FORMAT and MPG123_NEED_MORE (please read up on these on how to react!). + // The positive range of return values is used for "useful" values when appropriate. + // + // + // + + + namespace mpg + { + ///Enumeration of the message and error codes as returned by libmpg123 functions. + public enum class ErrorCode + { + done = MPG123_DONE, /// Message: Track ended. + new_format = MPG123_NEW_FORMAT, /// Message: Output format will be different on next call. + need_more = MPG123_NEED_MORE, /// Message: For feed reader: "Feed me more!" + err = MPG123_ERR, /// Generic Error + ok = MPG123_OK, /// Success + bad_outformat = MPG123_BAD_OUTFORMAT, /// Unable to set up output format! + bad_channel = MPG123_BAD_CHANNEL, /// Invalid channel number specified. + bad_rate = MPG123_BAD_RATE, /// Invalid sample rate specified. + err_16to8table = MPG123_ERR_16TO8TABLE, /// Unable to allocate memory for 16 to 8 converter table! + bad_param = MPG123_BAD_PARAM, /// Bad parameter id! + bad_buffer = MPG123_BAD_BUFFER, /// Bad buffer given -- invalid pointer or too small size. + out_of_mem = MPG123_OUT_OF_MEM, /// Out of memory -- some malloc() failed. + not_initialized = MPG123_NOT_INITIALIZED, /// You didn't initialize the library! + bad_decoder = MPG123_BAD_DECODER, /// Invalid decoder choice. + bad_handle = MPG123_BAD_HANDLE, /// Invalid mpg123 handle. + no_buffers = MPG123_NO_BUFFERS, /// Unable to initialize frame buffers (out of memory?). + bad_rva = MPG123_BAD_RVA, /// Invalid RVA mode. + no_gapless = MPG123_NO_GAPLESS, /// This build doesn't support gapless decoding. + no_space = MPG123_NO_SPACE, /// Not enough buffer space. + bad_types = MPG123_BAD_TYPES, /// Incompatible numeric data types. + bad_band = MPG123_BAD_BAND, /// Bad equalizer band. + err_null = MPG123_ERR_NULL, /// Null pointer given where valid storage address needed. + err_reader = MPG123_ERR_READER, /// Error reading the stream. + no_seek_from_end = MPG123_NO_SEEK_FROM_END, /// Cannot seek from end (end is not known). + bad_whence = MPG123_BAD_WHENCE, /// Invalid 'whence' for seek function. + no_timeout = MPG123_NO_TIMEOUT, /// Build does not support stream timeouts. + bad_file = MPG123_BAD_FILE, /// File access error. + no_seek = MPG123_NO_SEEK, /// Seek not supported by stream. + no_reader = MPG123_NO_READER, /// No stream opened. + bad_pars = MPG123_BAD_PARS, /// Bad parameter handle. + bad_index_par = MPG123_BAD_INDEX_PAR, /// Bad parameters to mpg123_index() + out_of_sync = MPG123_OUT_OF_SYNC, /// Lost track in bytestream and did not try to resync. + resync_fail = MPG123_RESYNC_FAIL, /// Resync failed to find valid MPEG data. + no_8bit = MPG123_NO_8BIT, /// No 8bit encoding possible. + bad_align = MPG123_BAD_ALIGN, /// Stack aligmnent error + null_buffer = MPG123_NULL_BUFFER, /// NULL input buffer with non-zero size... + no_relseek = MPG123_NO_RELSEEK, /// Relative seek not possible (screwed up file offset) + null_pointer = MPG123_NULL_POINTER, /// You gave a null pointer somewhere where you shouldn't have. + bad_key = MPG123_BAD_KEY, /// Bad key value given. + no_index = MPG123_NO_INDEX, /// No frame index in this build. + index_fail = MPG123_INDEX_FAIL, /// Something with frame index went wrong. + bad_decoder_setup = MPG123_BAD_DECODER_SETUP, /// Something prevents a proper decoder setup + missing_feature = MPG123_MISSING_FEATURE, /// This feature has not been built into libmpg123. + /* 1.8.1 */ + bad_value = MPG123_BAD_VALUE, /// A bad value has been given, somewhere. + lseek_failed = MPG123_LSEEK_FAILED, /// Low-level seek failed. + /* 1.12.0 */ + bad_custom_io = MPG123_BAD_CUSTOM_IO, /// Custom I/O not prepared. + lfs_overflow = MPG123_LFS_OVERFLOW, /// Offset value overflow during translation of large file API calls, + /// - your client program cannot handle that large file. + + }; + } + + ///Wrapper for mpg123_errors + public ref class mpg123error + { + protected: + ///Finalizer. + ///Cleanly handles mpg123_delete of internal (unmanaged) handles. + /// Implementation of CLR Finalize(). + !mpg123error(void); + + public: + ///Constructor. + mpg123error(void); + + ///Destructor. Used for final object deletion. + ///Calls finalizer for clean disposal of internal (unmanaged) library handles. + /// + /// Implementation of CLR Dispose(). + /// ~Destructor and !Finalizer are the prescribed implementation of Dispose() and Finalize(). + /// See Destructors and Finalizers in Visual C++ + ~mpg123error(void); + + ///Obtain a string description of the errcode meaning. + ///Returns a String description representing the error code. + /// + ///The error code to be described. + ///Returns a String description representing the error code. + static String^ __clrcall mpg123_plain_strerror(mpg123clr::mpg::ErrorCode errcode); + }; +} \ No newline at end of file diff --git a/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/id3v1.cpp b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/id3v1.cpp new file mode 100644 index 0000000..2b8bd87 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/id3v1.cpp @@ -0,0 +1,92 @@ +/* + mpg123clr: MPEG Audio Decoder library Common Language Runtime version. + + copyright 2009 by Malcolm Boczek - free software under the terms of the LGPL 2.1 + mpg123clr.dll is a derivative work of libmpg123 - all original mpg123 licensing terms apply. + + All rights to this work freely assigned to the mpg123 project. +*/ +/* + libmpg123: MPEG Audio Decoder library + + copyright 1995-2008 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + +*/ +/* + 1.8.1.0 04-Aug-09 Initial release. + 1.9.0.0 01-Oct-09 Technical cleanup - subst nullptr for NULL (mb) +*/ + +#include "StdAfx.h" +#include "id3v1.h" + +mpg123clr::id3::mpg123id3v1::mpg123id3v1(void) +{ +} + +mpg123clr::id3::mpg123id3v1::mpg123id3v1(mpg123_id3v1* sb) +{ + this->sb = sb; +} + + +// Destructor +mpg123clr::id3::mpg123id3v1::~mpg123id3v1(void) +{ + // clean up code to release managed resources + // ... + + // call Finalizer to clean up unmanaged resources + this->!mpg123id3v1(); +} + +// Finalizer +mpg123clr::id3::mpg123id3v1::!mpg123id3v1(void) +{ + // we do not create the underlying structure, so shouldn't dispose it either... +} + +String^ mpg123clr::id3::mpg123id3v1::tag::get() +{ + if (sb == nullptr || sb->tag == nullptr) return gcnew String(""); + + return Marshal::PtrToStringAnsi((IntPtr)sb->tag, (int)strnlen(sb->tag, 3)); +} + +String^ mpg123clr::id3::mpg123id3v1::title::get() +{ + if (sb == nullptr || sb->title == nullptr) return gcnew String(""); + + return Marshal::PtrToStringAnsi((IntPtr)sb->title, (int)strnlen(sb->title, 30)); +} + +String^ mpg123clr::id3::mpg123id3v1::artist::get() +{ + if (sb == nullptr || sb->artist == nullptr) return gcnew String(""); + + return Marshal::PtrToStringAnsi((IntPtr)sb->artist, (int)strnlen(sb->artist, 30)); +} + +String^ mpg123clr::id3::mpg123id3v1::album::get() +{ + if (sb == nullptr || sb->album == nullptr) return gcnew String(""); + + return Marshal::PtrToStringAnsi((IntPtr)sb->album, (int)strnlen(sb->album, 30)); +} + +String^ mpg123clr::id3::mpg123id3v1::comment::get() +{ + if (sb == nullptr || sb->comment == nullptr) return gcnew String(""); + + return Marshal::PtrToStringAnsi((IntPtr)sb->comment, (int)strnlen(sb->comment, 30)); +} + +int mpg123clr::id3::mpg123id3v1::genre::get() +{ + if (sb == nullptr) return 0; + + return sb->genre; +} + + diff --git a/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/id3v1.h b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/id3v1.h new file mode 100644 index 0000000..b1ce75e --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/id3v1.h @@ -0,0 +1,132 @@ +/* + mpg123clr: MPEG Audio Decoder library Common Language Runtime version. + + copyright 2009 by Malcolm Boczek - free software under the terms of the LGPL 2.1 + mpg123clr.dll is a derivative work of libmpg123 - all original mpg123 licensing terms apply. + + All rights to this work freely assigned to the mpg123 project. +*/ +/* + libmpg123: MPEG Audio Decoder library + + copyright 1995-2008 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + +*/ +/* + 1.8.1.0 04-Aug-09 Initial release. +*/ + +#pragma once + +#pragma warning(disable : 4635) +#include "mpg123.h" +#pragma warning(default : 4635) + +#include +#include + +#include +using namespace std; +using namespace System; +using namespace System::Runtime::InteropServices; + +namespace mpg123clr +{ + namespace id3 + { + ///id3check enumeration. + public enum class id3check + { + none = 0, + id3 = 2, /**< 0010 There is some ID3 info. */ + upd_id3 = MPG123_ID3, /**< 0011 There is some ID3 info. Also matches 0010 or NEW_ID3. */ + new_id3 = MPG123_NEW_ID3, /**< 0001 There is ID3 info that changed since last call to mpg123_id3. */ + icy = 8, /**< 1100 There is some ICY info. Also matches 0100 or NEW_ICY.*/ + upd_icy = MPG123_ICY, /**< 1100 There is some ICY info. Also matches 0100 or NEW_ICY.*/ + new_icy = MPG123_NEW_ICY, /**< 0100 There is ICY info that changed since last call to mpg123_icy. */ + }; + + // Recommended usage when creating reference type on the managed heap (not using stack semantics + // for reference types...) [see Destructors and Finalizers in Visual C++] + // + // A ^ myA = gcnew A; + // try + // { + // use myA + // } + // finally + // { + // delete myA; + // } + + ///Wrapper for mpg123_id3v1. + [StructLayout(LayoutKind::Sequential)] + public ref struct mpg123id3v1 + { + private: + mpg123_id3v1* sb; + protected: + ///Finalizer. + ///Cleanly handles mpg123_delete of internal (unmanaged) mpg123 handle. + /// Implementation of CLR Finalize(). + !mpg123id3v1(void); + internal: + ///Working Constructor. + ///Maps to mpg123_id3v1 memory. + /// + mpg123id3v1(mpg123_id3v1* sb); + public: + ///Constructor. + ///Only creates object for use as "out" target in ID3 constructor. + /// + mpg123id3v1(void); + + ///Destructor. Used for final object deletion. + ///Calls finalizer for clean disposal of internal (unmanaged) library handles. + /// + /// Implementation of CLR Dispose(). + /// ~Destructor and !Finalizer are the prescribed implementation of Dispose() and Finalize(). + /// See Destructors and Finalizers in Visual C++ + ~mpg123id3v1(void); + + ///Get the ID3v1 tag descriptor. + ///Property returns the ID3v1 tag (should always be "TAG"). + /// + ///The ID3v1 tag (should always be "TAG"). + property String^ tag{String^ __clrcall get();} + + ///Get the ID3v1 title text. + ///Property returns the ID3v1 title text. + /// + ///The ID3v1 title text. + property String^ title{String^ __clrcall get();} + + ///Get the ID3v1 artist text. + ///Property returns the ID3v1 artist text. + /// + ///The ID3v1 artist text. + property String^ artist{String^ __clrcall get();} + + ///Get the ID3v1 album text. + ///Property returns the ID3v1 album text. + /// + ///The ID3v1 album text. + property String^ album{String^ __clrcall get();} + + ///Get the ID3v1 comment text. + ///Property returns the ID3v1 comment text. + /// + ///The ID3v1 comment text. + property String^ comment{String^ __clrcall get();} + + ///Get the ID3v1 genre index. + ///Property returns the ID3v1 genre index. + /// + ///The ID3v1 genre index. + property int genre{int __clrcall get();} + + + }; + } +} \ No newline at end of file diff --git a/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/id3v2.cpp b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/id3v2.cpp new file mode 100644 index 0000000..a5ec9e3 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/id3v2.cpp @@ -0,0 +1,138 @@ +/* + mpg123clr: MPEG Audio Decoder library Common Language Runtime version. + + copyright 2009 by Malcolm Boczek - free software under the terms of the LGPL 2.1 + mpg123clr.dll is a derivative work of libmpg123 - all original mpg123 licensing terms apply. + + All rights to this work freely assigned to the mpg123 project. +*/ +/* + libmpg123: MPEG Audio Decoder library + + copyright 1995-2008 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + +*/ +/* + 1.8.1.0 04-Aug-09 Initial release. + 1.9.0.0 01-Oct-09 Technical cleanup - subst nullptr for NULL (mb) + 1.10.0.0 30-Nov-09 Add test for null base (sb) - in addition to null string test (mb) + (required if v2 referenced prior to file scan) +*/ + +#include "StdAfx.h" +#include "id3v2.h" + +mpg123clr::id3::mpg123id3v2::mpg123id3v2(void) +{ +} + +mpg123clr::id3::mpg123id3v2::mpg123id3v2(mpg123_id3v2* sb) +{ + this->sb = sb; +} + + +// Destructor +mpg123clr::id3::mpg123id3v2::~mpg123id3v2(void) +{ + // clean up code to release managed resources + // ... + + // call Finalizer to clean up unmanaged resources + this->!mpg123id3v2(); +} + +// Finalizer +mpg123clr::id3::mpg123id3v2::!mpg123id3v2(void) +{ + // we do not create the underlying structure, so shouldn't dispose it either... +} + +String^ mpg123clr::id3::mpg123id3v2::title::get() +{ + // updated: more efficient "union style" mpg123str + mpg123str^ str = (sb == nullptr || sb->title == nullptr) ? gcnew mpg123str("") : gcnew mpg123str(sb->title); + + // Deprecated remnant - uses "overlayed style" mpg123str - note inefficient PtrToStrucure... + // mpg123str^% str = gcnew mpg123str; + // Marshal::PtrToStructure((IntPtr)sb->title, str); + + return str->Text; +} + +String^ mpg123clr::id3::mpg123id3v2::artist::get() +{ + mpg123str^ str = (sb == nullptr || sb->artist == nullptr) ? gcnew mpg123str("") : gcnew mpg123str(sb->artist); + + return str->Text; +} + +String^ mpg123clr::id3::mpg123id3v2::album::get() +{ + mpg123str^ str = (sb == nullptr || sb->album == nullptr) ? gcnew mpg123str("") : gcnew mpg123str(sb->album); + + return str->Text; +} + +String^ mpg123clr::id3::mpg123id3v2::comment::get() +{ + mpg123str^ str = (sb == nullptr || sb->comment == nullptr) ? gcnew mpg123str("") : gcnew mpg123str(sb->comment); + + return str->Text; +} + +String^ mpg123clr::id3::mpg123id3v2::year::get() +{ + mpg123str^ str = (sb == nullptr || sb->year == nullptr) ? gcnew mpg123str("") : gcnew mpg123str(sb->year); + + return str->Text; +} + +String^ mpg123clr::id3::mpg123id3v2::genre::get() +{ + mpg123str^ str = (sb == nullptr || sb->genre == nullptr) ? gcnew mpg123str("") : gcnew mpg123str(sb->genre); + + return str->Text; +} + +int mpg123clr::id3::mpg123id3v2::version::get() +{ + return sb->version; +} + +array^ mpg123clr::id3::mpg123id3v2::MakeTextList(mpg123_text* ptr, size_t count) +{ + // WARN 4267 - clr limited to 32bit-length-size arrays!! + array^ ary = gcnew array((int)count); + + for (int ii = 0; ii < ary->Length; ii++) + { + // Remnant - for explicit layout + // mpg123text^% txt = gcnew mpg123text; + // Marshal::PtrToStructure((IntPtr)ptr++, txt); + + // New code - for "handle style" structure + mpg123text^% txt = gcnew mpg123text(ptr++); + + ary[ii] = txt; + } + + return ary; +} + +array^ mpg123clr::id3::mpg123id3v2::Comments::get() +{ + return MakeTextList(sb->comment_list, sb->comments); +} + +array^ mpg123clr::id3::mpg123id3v2::Texts::get() +{ + return MakeTextList(sb->text, sb->texts); +} + +array^ mpg123clr::id3::mpg123id3v2::Extras::get() +{ + return MakeTextList(sb->extra, sb->extras); +} + diff --git a/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/id3v2.h b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/id3v2.h new file mode 100644 index 0000000..8e4b046 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/id3v2.h @@ -0,0 +1,152 @@ +/* + mpg123clr: MPEG Audio Decoder library Common Language Runtime version. + + copyright 2009 by Malcolm Boczek - free software under the terms of the LGPL 2.1 + mpg123clr.dll is a derivative work of libmpg123 - all original mpg123 licensing terms apply. + + All rights to this work freely assigned to the mpg123 project. +*/ +/* + libmpg123: MPEG Audio Decoder library + + copyright 1995-2008 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + +*/ +/* + 1.8.1.0 04-Aug-09 Initial release. +*/ + +#pragma once + +#pragma warning(disable : 4635) +#include "mpg123.h" +#pragma warning(default : 4635) + +#include "string.h" +#include "text.h" + +#include +#include + +#include +using namespace std; +using namespace System; +using namespace System::Runtime::InteropServices; + +namespace mpg123clr +{ + namespace id3 + { + // Recommended usage when creating reference type on the managed heap (not using stack semantics + // for reference types...) [see Destructors and Finalizers in Visual C++] + // + // A ^ myA = gcnew A; + // try + // { + // use myA + // } + // finally + // { + // delete myA; + // } + + ///Wrapper for mpg123_id3v2. + [StructLayout(LayoutKind::Sequential)] + public ref struct mpg123id3v2 + { + private: + mpg123_id3v2* sb; + + array^ __clrcall MakeTextList(mpg123_text* ptr, size_t count); + + protected: + ///Finalizer. + ///Does nothing - wrapper points to underlying memory, this class doesn't allocate memory. + /// Implementation of CLR Finalize(). + !mpg123id3v2(void); + + internal: + ///Working Constructor. + ///Maps to mpg123_id3v2 memory. + /// + mpg123id3v2(mpg123_id3v2* sb); + + public: + ///Constructor. + ///Only creates object for use as "out" target in ID3 constructor. + /// + mpg123id3v2(void); + + ///Destructor. Used for final object deletion. + ///Calls finalizer for clean disposal of internal (unmanaged) library handles. + /// + /// Implementation of CLR Dispose(). + /// ~Destructor and !Finalizer are the prescribed implementation of Dispose() and Finalize(). + /// See Destructors and Finalizers in Visual C++ + ~mpg123id3v2(void); + + ///Get the ID3v2 title text. + ///Property returns the last encountered ID3v2 title text. + /// + ///The last encountered ID3v2 title text. + property String^ title{String^ __clrcall get();} + + ///Get the ID3v2 artist text. + ///Property returns the last encountered ID3v2 artist text. + /// + ///The last encountered ID3v2 artist text. + property String^ artist{String^ __clrcall get();} + + ///Get the ID3v2 album text. + ///Property returns the last encountered ID3v2 album text. + /// + ///The last encountered ID3v2 album text. + property String^ album{String^ __clrcall get();} + + ///Get the ID3v2 comment text. + ///Property returns the last encountered ID3v2 comment text. + /// + ///The last encountered ID3v2 comment text. + property String^ comment{String^ __clrcall get();} + + ///Get the ID3v2 year text. + ///Property returns the last encountered ID3v2 year text. + /// + ///The last encountered ID3v2 year text. + property String^ year{String^ __clrcall get();} + + ///Get the ID3v2 genre text. + ///Property returns the last encountered ID3v2 genre text. + /// + ///The last encountered ID3v2 genre text. + property String^ genre{String^ __clrcall get();} + + ///Get the ID3v2 version. + ///Property returns the ID3v2 version. + /// + ///The ID3v2 version. + property int version{int __clrcall get();} + + + ///Get an array of Comments. + ///Property returns an array of Comments. + /// + ///An array of Comments. + property array^ Comments{array^ __clrcall get();}; + + ///Get an array of ID3v2 text fields (including USLT). + ///Property returns an array of ID3v2 text fields (including USLT). + /// + ///An array of ID3v2 text fields (including USLT). + property array^ Texts{array^ __clrcall get();}; + + ///Get an array of extra (TXXX) fields. + ///Property returns an array of extra (TXXX) fields. + /// + ///An array of extra (TXXX) fields. + property array^ Extras{array^ __clrcall get();}; + + }; + } +} diff --git a/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/mpg123clr.cpp b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/mpg123clr.cpp new file mode 100644 index 0000000..5ed0099 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/mpg123clr.cpp @@ -0,0 +1,896 @@ +/* + mpg123clr: MPEG Audio Decoder library Common Language Runtime version. + + copyright 2009-2011 by Malcolm Boczek - free software under the terms of the LGPL 2.1 + mpg123clr.dll is a derivative work of libmpg123 - all original mpg123 licensing terms apply. + + All rights to this work freely assigned to the mpg123 project. +*/ +/* + libmpg123: MPEG Audio Decoder library + + copyright 1995-2011 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + +*/ +/* + 1.8.1.0 04-Aug-09 Initial release. + 1.9.0.0 24-Sep-09 Function names harmonized with libmpg123 (mb) + 1.9.0.0 01-Oct-09 Technical cleanup - subst nullptr for NULL (mb) + 1.9.0.0 13-Oct-09 pin_ptr = nullptr on return (mb) + 1.9.0.1 24-Nov-09 performance update - removed try/finally (mb) + 1.10.0.0 30-Nov-09 release match - added mpg123_feature (mb) + 1.12.0.0 14-Apr-10 release match - added framebyframe and "handle" ReplaceReaders (mb) + 1.13.0.0 13-Jan-11 release match - added encsize (mb) +*/ + +// mpg123clr.cpp : Defines the exported functions for the DLL application. +// + +#include "stdafx.h" +#include "mpg123clr.h" + + +mpg123clr::mpg123::mpg123(void) +{ + mh = nullptr; + useHandleReplacement = false; + lastReplacementWasHandle = false; +} + +mpg123clr::mpg123::mpg123(mpg123_handle* mh) +{ + this->mh = mh; + useHandleReplacement = false; + lastReplacementWasHandle = false; +} + +// Destructor +mpg123clr::mpg123::~mpg123(void) +{ + // clean up code to release managed resources + + // call Finalizer to clean up unmanaged resources + this->!mpg123(); + + // CLI implements SuppressFinalize - therefore not required here... + //GC::SuppressFinalize(this); +} + +// Finalizer +mpg123clr::mpg123::!mpg123(void) +{ + // clean up unmanaged resources + if (mh != nullptr) + { + ::mpg123_delete(mh); + mh = nullptr; + } +} + +void mpg123clr::mpg123::mpg123_delete(void) +{ + if (mh != nullptr) + { + ::mpg123_delete(mh); + mh = nullptr; + } +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_init(void) +{ + return (mpg123clr::mpg::ErrorCode) ::mpg123_init(); +} + +void mpg123clr::mpg123::mpg123_exit(void) +{ + ::mpg123_exit(); +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_new(String ^ decoder) +{ + const char* chars = (const char*)(Marshal::StringToHGlobalAnsi(decoder)).ToPointer(); + + int err; + mh = ::mpg123_new(chars, &err); + + Marshal::FreeHGlobal(IntPtr((void*)chars)); + + return (mpg123clr::mpg::ErrorCode) err; +} +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_new(void) +{ + int err; + mh = ::mpg123_new(NULL, &err); + + return (mpg123clr::mpg::ErrorCode) err; +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_parnew(mpg123clr::advpars^ par, String ^ decoder) +{ + const char* chars = (const char*)(Marshal::StringToHGlobalAnsi(decoder)).ToPointer(); + + int err; + mh = ::mpg123_parnew(par->mp, chars, &err); + + Marshal::FreeHGlobal(IntPtr((void*)chars)); + + return (mpg123clr::mpg::ErrorCode) err; +} +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_parnew(mpg123clr::advpars^ par) +{ + int err; + mh = ::mpg123_parnew(par->mp, NULL, &err); + + return (mpg123clr::mpg::ErrorCode) err; +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_param(mpg123clr::mpg::parms type, int val, double fval) +{ + return (mpg123clr::mpg::ErrorCode) ::mpg123_param(mh, (mpg123_parms)type, val, fval); +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_getparam(mpg123clr::mpg::parms type, [Out] int% val, [Out] double% fval) +{ + // Avoid need for local intermediary variables + pin_ptr _val = &val; + pin_ptr _fval = &fval; + + int ret = ::mpg123_getparam(mh, (mpg123_parms)type, (long*) _val, _fval); + + _fval = nullptr; + _val = nullptr; + + return (mpg123clr::mpg::ErrorCode) ret; +} + +int mpg123clr::mpg123::mpg123_feature(mpg123clr::mpg::feature_set key) +{ + return ::mpg123_feature((mpg123_feature_set) key); +} + +String^ mpg123clr::mpg123::mpg123_strerror(void) +{ + return gcnew String(::mpg123_strerror(mh)); +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_errcode(void) +{ + return (mpg123clr::mpg::ErrorCode) ::mpg123_errcode(mh); +} + +array^ mpg123clr::mpg123::StringArrayFromPtr(const char** ptr) +{ + int count = 0; + + // count how many strings in array by walking up the array until NULL found + while (*(ptr++) != NULL){ ++count; } + + // create an array of the correct size + array ^ str = gcnew array(count); + + --ptr; // loop leaves ptr +2 beyond end of array - put ptr back to just after last index + + // walk back down the array, extracting the strings + while (count-- > 0){ str[count] = gcnew String(*(--ptr)); } + + return str; +} + +array^ mpg123clr::mpg123::mpg123_decoders(void) +{ + return StringArrayFromPtr(::mpg123_decoders()); +} + +array^ mpg123clr::mpg123::mpg123_supported_decoders(void) +{ + return StringArrayFromPtr(::mpg123_supported_decoders()); +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_decoder(String^ name) +{ + const char* chars = (const char*)(Marshal::StringToHGlobalAnsi(name)).ToPointer(); + + int ret; + + // one of the few mpg123 places that fault with an exception... + try { ret = ::mpg123_decoder(mh, chars); } + catch(Exception^){ ret = MPG123_ERR; } + + Marshal::FreeHGlobal(IntPtr((void*)chars)); + + return (mpg123clr::mpg::ErrorCode) ret; +} + +String^ mpg123clr::mpg123::mpg123_current_decoder(void) +{ + return gcnew String(::mpg123_current_decoder(mh)); +} + +array^ mpg123clr::mpg123::mpg123_rates(void) +{ + size_t number; + const long* list; + + ::mpg123_rates(&list, &number); + + array^ rList = gcnew array((int)number); + + int index = 0; + + // walk the array, extracting the rates + while (index < (int)number){ rList[index++] = *(list++); } + + return rList; +} + +array^ mpg123clr::mpg123::mpg123_encodings(void) +{ + size_t number; + const int* list; + + ::mpg123_encodings(&list, &number); + + // WARN 4267 - assuming that the number of encodings will never exceed 32bits + array^ rList = gcnew array((int)number); + + int index = 0; + + // walk the array, extracting the rates + while (index < (int)number){ rList[index++] = (mpg123clr::mpg::enc) *(list++); } + + return rList; +} + +int mpg123clr::mpg123::mpg123_encsize(mpg123clr::mpg::enc encoding) +{ + return ::mpg123_encsize((int) encoding); +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_format_none(void) +{ + return (mpg123clr::mpg::ErrorCode) ::mpg123_format_none(mh); +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_format_all(void) +{ + return (mpg123clr::mpg::ErrorCode) ::mpg123_format_all(mh); +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_format(int rate, mpg123clr::mpg::channelcount channels, mpg123clr::mpg::enc encodings) +{ + return (mpg123clr::mpg::ErrorCode) ::mpg123_format(mh, rate, (int) channels, (int) encodings); +} + +mpg123clr::mpg::channelcount mpg123clr::mpg123::mpg123_format_support(int rate, mpg123clr::mpg::enc encodings) +{ + return (mpg123clr::mpg::channelcount) ::mpg123_format_support(mh, rate, (int) encodings); +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_getformat([Out] int% rate, [Out] mpg123clr::mpg::channelcount% channels, [Out] mpg123clr::mpg::enc% encodings) +{ + // either:- + // + // long _rate; + // int _chan, _enc; + // int ret = mpg123_getformat(mh, &_rate, &_chan, &_enc); + // rate = _rate; + // channels = _chan; + // encodings = _enc; + // return (mpg123clr::mpg::ErrorCode) ret; + // + // or:- + // use pinned pointers instead + pin_ptr _rate = &rate; + pin_ptr _chan = &channels; + pin_ptr _enc = &encodings; + + int ret = ::mpg123_getformat(mh, (long*)_rate, (int*)_chan, (int*)_enc); + + _enc = nullptr; + _chan = nullptr; + _rate = nullptr; + + return (mpg123clr::mpg::ErrorCode) ret; +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_open(String^ path) +{ + const char* chars = (const char*)(Marshal::StringToHGlobalAnsi(path)).ToPointer(); + + _ReplaceReader(); + + int ret = ::mpg123_open(mh, chars); + + Marshal::FreeHGlobal(IntPtr((void*)chars)); + + return (mpg123clr::mpg::ErrorCode) ret; +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_open_fd(int filedescriptor) +{ + _ReplaceReader(); + + return (mpg123clr::mpg::ErrorCode) ::mpg123_open_fd(mh, filedescriptor); +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_open_handle(System::Object^ obj) +{ + // NOTE: You must have configured callbacks using mpg123_replace_reader_handle + // before calling mpg123_open_handle! + + _ReplaceReader(); // activate callbacks + + // Make sure we free this in Close functions + userObjectHandle = GCHandle::Alloc(obj); + + // NOTE: This sends a HANDLE not an ADDRESS, no pinning required + return (mpg123clr::mpg::ErrorCode) ::mpg123_open_handle(mh, (void*)GCHandle::ToIntPtr(userObjectHandle).ToPointer()); +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_open_feed(void) +{ + _ReplaceReader(); + + return (mpg123clr::mpg::ErrorCode) ::mpg123_open_feed(mh); +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_close(void) +{ + // Closes 'mh' and calls Cleanup delegate if provided + int ret = ::mpg123_close(mh); + + // See GCHandle.Free - caller must ensure Free called only once for a given handle. + if (userObjectHandle.IsAllocated) userObjectHandle.Free(); + + return (mpg123clr::mpg::ErrorCode) ret; +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_read(array^ buffer, [Out] size_t% count) +{ + pin_ptr _count = &count; + pin_ptr _ptr = &buffer[0]; + + int ret = ::mpg123_read(mh, _ptr, buffer->Length, _count); + + _ptr = nullptr; + _count = nullptr; + + return (mpg123clr::mpg::ErrorCode) ret; +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_read(array^ buffer, size_t offset, size_t size, [Out] size_t% count) +{ + pin_ptr _count = &count; + // WARN 4267 - clr limited to 32bit-length-size arrays!! + pin_ptr _ptr = &buffer[(int)offset]; + + int ret = ::mpg123_read(mh, _ptr, size, _count); + + _ptr = nullptr; + _count = nullptr; + + return (mpg123clr::mpg::ErrorCode) ret; +} + + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_feed(array^ inbuffer, size_t size) +{ + pin_ptr _ptr = &inbuffer[0]; + + int ret = ::mpg123_feed(mh, _ptr, size); + + _ptr = nullptr; + + return (mpg123clr::mpg::ErrorCode) ret; +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_decode(array^ inbuffer, size_t insize, array^ outbuffer, size_t outsize, [Out] size_t% count) +{ + pin_ptr _count = &count; + pin_ptr _inptr = &inbuffer[0]; + pin_ptr _outptr = &outbuffer[0]; + + int ret = ::mpg123_decode(mh, _inptr, insize, _outptr, outsize, _count); + + _outptr = nullptr; + _inptr = nullptr; + _count = nullptr; + + return (mpg123clr::mpg::ErrorCode) ret; +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_decode_frame([Out] off_t% num, [Out] IntPtr% audio, [Out] size_t% count) +{ + pin_ptr _count = &count; + pin_ptr _num = # + pin_ptr _x = &audio; + + int ret = ::mpg123_decode_frame(mh, _num, (unsigned char**)_x, _count); + + _x = nullptr; + _num = nullptr; + _count = nullptr; + + return (mpg123clr::mpg::ErrorCode) ret; +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_framebyframe_decode([Out] off_t% num, [Out] IntPtr% audio, [Out] size_t% count) +{ + // NOTE: must use framebyframe_next to obtain successive frames + + pin_ptr _count = &count; + pin_ptr _num = # + pin_ptr _x = &audio; + + int ret = ::mpg123_framebyframe_decode(mh, _num, (unsigned char**)_x, _count); + + _x = nullptr; + _num = nullptr; + _count = nullptr; + + return (mpg123clr::mpg::ErrorCode) ret; +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_framebyframe_next() +{ + // mpg123lib has warning, Experimental API. Watch for updates!!! + // framebyframe_decode doesn't automatically move on to next frame, + // use framebyframe_next to move on to "Find, read and parse the next mp3 frame" + int ret = ::mpg123_framebyframe_next(mh); + + return (mpg123clr::mpg::ErrorCode) ret; +} + +long long mpg123clr::mpg123::mpg123_tell(void) +{ + return ::mpg123_tell(mh); +} + +long long mpg123clr::mpg123::mpg123_tellframe(void) +{ + return ::mpg123_tellframe(mh); +} + +long long mpg123clr::mpg123::mpg123_tell_stream(void) +{ + return ::mpg123_tell_stream(mh); +} + +long long mpg123clr::mpg123::mpg123_seek(long long offset, SeekOrigin origin) +{ + return ::mpg123_seek(mh, (off_t)offset, (int)origin); +} + +long long mpg123clr::mpg123::mpg123_feedseek(long long offset, SeekOrigin origin, [Out] long long% input_offset) +{ + // NOTE: off_t fiddles... + // pin_ptr _input_offset = &input_offset; // type mismatch between 32 and 64 bit offsets. + + off_t _input_offset; // type accomodation + + off_t ret = ::mpg123_feedseek(mh, (off_t)offset, (int)origin, &_input_offset); // ok types + + input_offset = _input_offset; // type conversion + + return ret; +} + +long long mpg123clr::mpg123::mpg123_seek_frame(long long frameoffset, SeekOrigin origin) +{ + return ::mpg123_seek_frame(mh, (off_t)frameoffset, (int)origin); +} + +long long mpg123clr::mpg123::mpg123_timeframe(double seconds) +{ + return ::mpg123_timeframe(mh, seconds); +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_index([Out] array^% index, [Out] long long% step) +{ + // remnant: only works if off_t, index and step are 32 bit - possible redo for 64 bit library + // pin_ptr _step = &step; + // int ret = mpg123_index(mh, &_list, (off_t*)_step, &_count); + // index = gcnew array((int)_count); + // Marshal::Copy((IntPtr)_list, index, 0, (int)_count); + + // alternate: works for 32 and 64 bit libraries - returns long long values + off_t* _list; + size_t _count; + off_t _step; // type accomodation + + int ret = ::mpg123_index(mh, &_list, &_step, &_count); + + step = _step; // type conversion + + // WARN 4267 - clr limited to 32bit-length-size arrays!! + index = gcnew array((int)_count); + + // walk the array, extracting the rates + int idx = 0; // array length limited to 32bit + while (idx < index->Length){ index[idx++] = *(_list++); } + + return (mpg123clr::mpg::ErrorCode) ret; +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_index([Out] IntPtr% indexarr, [Out] long long% step, [Out] size_t% fill) +{ + pin_ptr _fill = &fill; + pin_ptr _x = &indexarr; // NOTE: untyped index pointer. + off_t _step; // type accomodation + + int ret = ::mpg123_index(mh, (off_t**)_x, &_step, _fill); + + step = _step; // type conversion + + _x = nullptr; + _fill = nullptr; + + return (mpg123clr::mpg::ErrorCode) ret; +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_position( + long long frameoffset, long long bufferedbytes, [Out] long long% currentframe, [Out] long long% framesleft, + [Out] double% currentseconds, [Out] double% secondsleft) +{ + // NOTE: off_t fiddles + // pin_ptr _currentframe = ¤tframe; + // pin_ptr _framesleft = &framesleft; + pin_ptr _currentseconds = ¤tseconds; + pin_ptr _secondsleft = &secondsleft; + off_t _currentframe; // type accomodation + off_t _framesleft; // type accomodation + + int ret = ::mpg123_position(mh, (off_t)frameoffset, (off_t)bufferedbytes, &_currentframe, &_framesleft, _currentseconds, _secondsleft); + + currentframe = _currentframe; // type conversion + framesleft = _framesleft; // type conversion + + _secondsleft = nullptr; + _currentseconds = nullptr; + + return (mpg123clr::mpg::ErrorCode) ret; +} + +#pragma region Volume and Equalizer + + /// \defgroup mpg123_voleq mpg123 volume and equalizer + /// + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_eq(mpg123clr::mpg::channels channel, int band, double fval) +{ + return (mpg123clr::mpg::ErrorCode) ::mpg123_eq(mh, (mpg123_channels)channel, band, fval); +} + +double mpg123clr::mpg123::mpg123_geteq(mpg123clr::mpg::channels channel, int band) +{ + return ::mpg123_geteq(mh, (mpg123_channels)channel, band); +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_reset_eq(void) +{ + return (mpg123clr::mpg::ErrorCode) ::mpg123_reset_eq(mh); +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_volume(double volume) +{ + return (mpg123clr::mpg::ErrorCode) ::mpg123_volume(mh, volume); +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_volume_change(double change) +{ + return (mpg123clr::mpg::ErrorCode) ::mpg123_volume_change(mh, change); +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_getvolume([Out] double% basevol, [Out] double% really, [Out] double% rva_db) +{ + pin_ptr _basevol = &basevol; + pin_ptr _really = &really; + pin_ptr _rva_db = &rva_db; + + int ret = ::mpg123_getvolume(mh, _basevol, _really, _rva_db); + + _rva_db = nullptr; + _really = nullptr; + _basevol = nullptr; + + return (mpg123clr::mpg::ErrorCode) ret; +} + +#pragma endregion -Volume and Equalizer +#pragma region Status and Information + + // \defgroup mpg123_status mpg123 status and information + // + // + // + +// The "proper" way to manage structs... +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_safeinfo([Out]mpeg_frameinfo^% finfo) +{ + // "out" our return reference and grab some memory + finfo = gcnew mpeg_frameinfo; + IntPtr pp = Marshal::AllocHGlobal(Marshal::SizeOf(finfo)); + + // get the info + + // could cast away... + // int ret = mpg123_info(mh, reinterpret_cast((int)pp)); + // int ret = mpg123_info(mh, static_cast((void*)pp)); + + // or let the compiler decide... + int ret = ::mpg123_info(mh, (mpg123_frameinfo*)(void*)pp); + + // marshal data into return object and free temporary memory + Marshal::PtrToStructure(pp, finfo); + Marshal::FreeHGlobal(pp); + + return (mpg123clr::mpg::ErrorCode) ret; +} + +// The "efficient" way to manage structs... +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_info([Out]mpeg_frameinfo^% finfo) +{ + finfo = gcnew mpeg_frameinfo; + + pin_ptr _ptr = &finfo->version; + + // According to SizeOf... + // The unmanaged and managed sizes of an object can differ, this would imply + // that the memory layout for each would also be different, which would indicate + // that using a ptr, derived from a ptr-to-a-managed type, in unmanaged code could + // have unforseen results. + // + // In non-homogenous structs (like mpg123text) it can lead to corrupted CLR stack. + // In homogenous structs (like finfo) it appears to be "managable". + // + // However, until it fails it'll do... and it's much faster (see mpg123_safeinfo(...)). + + // WARNING: + // The epitome of "unsafe" as defined by CLR (using unmanaged pointers). + // If we start to get CLR stack corruptions - check here first! (see SafeInfo for "safe" managed version) + int ret = ::mpg123_info(mh, (mpg123_frameinfo*)_ptr); + + _ptr = nullptr; + + return (mpg123clr::mpg::ErrorCode) ret; +} + +size_t mpg123clr::mpg123::mpg123_safe_buffer(void) +{ + return ::mpg123_safe_buffer(); +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_scan(void) +{ + return (mpg123clr::mpg::ErrorCode) ::mpg123_scan(mh); +} + +long long mpg123clr::mpg123::mpg123_length(void) +{ + return ::mpg123_length(mh); +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_set_filesize(long long size) +{ + return (mpg123clr::mpg::ErrorCode) ::mpg123_set_filesize(mh, (off_t)size); +} + +double mpg123clr::mpg123::mpg123_tpf(void) +{ + return ::mpg123_tpf(mh); +} + +long mpg123clr::mpg123::mpg123_clip(void) +{ + return ::mpg123_clip(mh); +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_getstate(mpg123clr::mpg::state key, [Out] int% val, [Out] double% fval) +{ + pin_ptr _val = &val; + pin_ptr _fval = &fval; + + int ret = ::mpg123_getstate(mh, (mpg123_state)key, (long*) _val, _fval); + + _fval = nullptr; + _val = nullptr; + + return (mpg123clr::mpg::ErrorCode) ret; +} + +#pragma endregion -Status and Information + +#pragma region Metadata Handling + + // \defgroup mpg123_metadata mpg123 metadata handling + // + // Functions to retrieve the metadata from MPEG Audio files and streams. + // Also includes string handling functions. + // + +mpg123clr::id3::id3check mpg123clr::mpg123::mpg123_meta_check(void) +{ + return (mpg123clr::id3::id3check ) ::mpg123_meta_check(mh); +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_id3([Out]id3::mpg123id3v1^% v1, [Out]id3::mpg123id3v2^% v2) +{ + mpg123_id3v1* pv1; + mpg123_id3v2* pv2; + + // doc says "pv1 and pv2 may be set to NULL when there is no corresponding data." + // they may also be set to point to empty structure... + int ret = ::mpg123_id3(mh, &pv1, &pv2); + + v1 = gcnew mpg123clr::id3::mpg123id3v1(pv1); + v2 = gcnew mpg123clr::id3::mpg123id3v2(pv2); + + return (mpg123clr::mpg::ErrorCode) ret; +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_icy([Out]IntPtr% icy_meta) +{ + char* _icy_meta; + + int ret = ::mpg123_icy(mh, &_icy_meta); + + icy_meta = (IntPtr) _icy_meta; + + return (mpg123clr::mpg::ErrorCode) ret; +} + +array^ mpg123clr::mpg123::mpg123_icy2utf8(IntPtr icy_text) +{ + // TODO: Do we really need this? + // char* putf8 = mpg123_icy2utf8(const_cast(reinterpret_cast(icy_text.ToPointer()))); + + // Or is this adequate? + char* putf8 = ::mpg123_icy2utf8((const char*)(void*) icy_text); + + // WARN 4267 - clr limited to 32bit-length-size arrays!! + array^ ary = gcnew array((int)strlen(putf8)); + + Marshal::Copy((IntPtr)putf8, ary, 0, ary->Length); + free(putf8); + + return ary; +} + +#pragma endregion -Metadata Handling + +#pragma region Low Level I/O + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_replace_buffer(IntPtr data, size_t size) +{ + // "data" buffer should be fixed BEFORE calling this function. + + // TODO: to cast or not to cast?? + // return (mpg123clr::mpg::ErrorCode) mpg123_replace_buffer(mh, reinterpret_cast(data.ToPointer()), size); + + return (mpg123clr::mpg::ErrorCode) ::mpg123_replace_buffer(mh, (unsigned char*)(void*) data, size); +} + +size_t mpg123clr::mpg123::mpg123_outblock(void) +{ + return ::mpg123_outblock(mh); +} + +void mpg123clr::mpg123::_ReplaceReader(void) +{ + if ((readDel == r_readDel) && (seekDel == r_seekDel) + && (readHDel == r_readHDel) && (seekDel == r_seekHDel) && (cleanHDel == r_cleanHDel)) return; + + // readDel and seekDel are "keep alive" fields that prevent GC of the delegates. + // the underlying function pointers no not require "pinning". + + // Note: most examples use GCHandle::Alloc to "pin" the delegate but this is usually to prevent GC + // outside of function scope and is not strictly necessary here since readDel and seekDel never go + // out of scope. + + // See MS: c++, How to: Marshal Callbacks and Delegates Using C++ Interop + // for more details. + + readDel = r_readDel; + seekDel = r_seekDel; + readHDel = r_readHDel; + seekHDel = r_seekHDel; + cleanHDel = r_cleanHDel; + + // just for clarity + typedef off_t (_cdecl* SEEKCB)(int, off_t, int); + typedef ssize_t (_cdecl* READCB)(int, void*, size_t); + typedef off_t (_cdecl* HSEEKCB)(void*, off_t, int); + typedef ssize_t (_cdecl* HREADCB)(void*, void*, size_t); + typedef void (_cdecl* HCLEANCB)(void*); + + // NOTE: GetFunctionPointerForDelegate doesn't like nullptr + // NOTE: I'm not suggesting that replace_reader and replace_reader_handle should be + // intermingled, just trying to maintain a clean stack + + if (!useHandleReplacement) + { + if (lastReplacementWasHandle) + ::mpg123_replace_reader_handle(mh, nullptr, nullptr, nullptr); + + ::mpg123_replace_reader( + mh, + (readDel != nullptr) ? (READCB)(Marshal::GetFunctionPointerForDelegate(readDel)).ToPointer() : nullptr, + (seekDel != nullptr) ? (SEEKCB)(Marshal::GetFunctionPointerForDelegate(seekDel)).ToPointer() : nullptr + ); + } + else + { + if (!lastReplacementWasHandle) // can give redundant call on first use - microscopically inefficient - not catastrophic + ::mpg123_replace_reader(mh, nullptr, nullptr); + + ::mpg123_replace_reader_handle( + mh, + (readHDel != nullptr) ? (HREADCB)(Marshal::GetFunctionPointerForDelegate(readHDel)).ToPointer() : nullptr, + (seekHDel != nullptr) ? (HSEEKCB)(Marshal::GetFunctionPointerForDelegate(seekHDel)).ToPointer() : nullptr, + (cleanHDel != nullptr) ? (HCLEANCB)(Marshal::GetFunctionPointerForDelegate(cleanHDel)).ToPointer() : nullptr + ); + } + lastReplacementWasHandle = useHandleReplacement; +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_replace_reader(ReadDelegate^ r_read, SeekDelegate^ r_lseek) +{ + // save temporary delegates to be implemented at next 'Open' + r_readDel = r_read; + r_seekDel = r_lseek; + r_readHDel = nullptr; + r_seekHDel = nullptr; + r_cleanHDel = nullptr; + useHandleReplacement = false; + + return mpg123clr::mpg::ErrorCode::ok; + +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_replace_reader_handle(ReadHandleDelegate^ rh_read, SeekHandleDelegate^ rh_lseek, CleanupHandleDelegate^ rh_clean) +{ + // save temporary delegates to be implemented at next 'Open' + r_readHDel = rh_read; + r_seekHDel = rh_lseek; + r_cleanHDel = rh_clean; + r_readDel = nullptr; + r_seekDel = nullptr; + useHandleReplacement = true; + + return mpg123clr::mpg::ErrorCode::ok; + +} + +#pragma endregion -Low Level I/O + +#pragma region MS Unicode Extension + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_topen(String^ path) +{ + _ReplaceReader(); // mpg123_tOpen will replace its own reader, this is just for consistency + + const _TCHAR* chars = (const _TCHAR*)(Marshal::StringToHGlobalUni(path)).ToPointer(); + + int ret = ::mpg123_topen(mh, chars); + + Marshal::FreeHGlobal(IntPtr((void*)chars)); + + return (mpg123clr::mpg::ErrorCode) ret; +} + +mpg123clr::mpg::ErrorCode mpg123clr::mpg123::mpg123_tclose(void) +{ + // Not sure if t_close calls Cleanup (it shouldn't since t_open substitutes its own readers) + int ret = ::mpg123_tclose(mh); + + // Fairly sure replace_reader_handle, topen and tclose are incompatible, just for consistency + // See GCHandle.Free - caller must ensure Free called only once for a given handle. + if (userObjectHandle.IsAllocated) userObjectHandle.Free(); + + return (mpg123clr::mpg::ErrorCode) ret; +} + +#pragma endregion -MS Unicode Extension + + diff --git a/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/mpg123clr.h b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/mpg123clr.h new file mode 100644 index 0000000..e4bc94a --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/mpg123clr.h @@ -0,0 +1,953 @@ +/* + mpg123clr: MPEG Audio Decoder library Common Language Runtime version. + + copyright 2009-2011 by Malcolm Boczek - free software under the terms of the LGPL 2.1 + mpg123clr.dll is a derivative work of libmpg123 - all original mpg123 licensing terms apply. + + All rights to this work freely assigned to the mpg123 project. +*/ +/* + libmpg123: MPEG Audio Decoder library + + copyright 1995-2011 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + +*/ +/* + 1.8.1.0 04-Aug-09 Initial release. + 1.9.0.0 24-Sep-09 Function names harmonized with libmpg123 (mb) + 1.10.0.0 30-Nov-09 release match - added mpg123_feature (mb) + 1.12.0.0 14-Apr-10 release match - added framebyframe and "handle" ReplaceReaders (mb) + 1.13.0.0 13-Jan-11 release match - added encsize (mb) +*/ + +#pragma once + +#pragma warning(disable : 4635) +#include "mpg123.h" +#pragma warning(default : 4635) + +#include "enum.h" +#include "error.h" +#include "id3v1.h" +#include "id3v2.h" +#include "advanced.h" + +#include // for posix proof of concept only + +#include +#include +#include + +#include +using namespace std; +using namespace System; +using namespace System::IO; +using namespace System::Runtime::InteropServices; + +namespace mpg123clr +{ + + + // Recommended usage when creating reference type on the managed heap (not using stack semantics + // for reference types...) [see (Microsoft) Destructors and Finalizers in Visual C++] + // + // C++/CLI + // A myA; + // // use myA here + // + // Equivalent user code: + // + // A ^ myA = gcnew A; + // try { /* use myA here */ } finally { delete myA; } + // + // + // C# (from wikipedia) + // using(A myA = new A()) { /* Use myA here */ } + // Compiler calls myA.Dispose(), in a "finally" of a "try/finally" block + // + // Equivalent user code: + // + // A myA = new myA(); + // try { /* Use myA here */ } finally { myA.Dispose(); } + // + // Otherwise Finalizer will be nondeterministically called by GC + + + ///Wrapper for libmpg123. + public ref class mpg123 + { + +#pragma region Callback and Delegate + + // Functional callbacks for low-level I/O ReplaceReader + + public: + ///Seek Delegate. + ///Callback seek function to provide low-level stream access to posix-like seek operations. + /// Requires user supplied static callback fuction of form off_t fn(int fd, off_t offset, int origin). + ///Returns callee supplied resulting offset from start of file or -1 for error. + /// + ///Contains file descriptor. + ///Contains required offset value. + ///Contains relative origin value (whence) applied to offset. + ///Callee supplied resulting offset from start of file or -1 for error. + [UnmanagedFunctionPointer(CallingConvention::Cdecl)] + delegate off_t SeekDelegate(int fd, off_t offset, int origin); + + [UnmanagedFunctionPointer(CallingConvention::Cdecl)] + delegate off_t SeekHandleDelegate(void* handle, off_t offset, int origin); + + ///Read Delegate. + ///Callback read function to provide low-level stream access to posix-like read operations. + /// Requires user supplied static callback fuction of form ssize_t fn(int fd, void* buffer, size_t size). + ///Returns callee supplied resulting actual number of bytes read or -1 for error. + /// + ///Contains file descriptor. + ///Contains address of buffer. + ///Contains size of buffer. + ///Callee supplied resulting actual number of bytes read or -1 for error. + [UnmanagedFunctionPointer(CallingConvention::Cdecl)] + delegate ssize_t ReadDelegate(int fd, void* buffer, size_t size); + + [UnmanagedFunctionPointer(CallingConvention::Cdecl)] + delegate ssize_t ReadHandleDelegate(void* handle, void* buffer, size_t size); + + [UnmanagedFunctionPointer(CallingConvention::Cdecl)] + delegate void CleanupHandleDelegate(void* handle); + + private: + // Delegate "keep alive" fields to prevent GC of delegate. + SeekDelegate^ seekDel; + ReadDelegate^ readDel; + + SeekHandleDelegate^ seekHDel; + ReadHandleDelegate^ readHDel; + CleanupHandleDelegate^ cleanHDel; + + GCHandle userObjectHandle; + + // Temporary delegate store, replacereader action is defered until next stream 'open' action + SeekDelegate^ r_seekDel; + ReadDelegate^ r_readDel; + + SeekHandleDelegate^ r_seekHDel; + ReadHandleDelegate^ r_readHDel; + CleanupHandleDelegate^ r_cleanHDel; + + bool useHandleReplacement; + bool lastReplacementWasHandle; + +#pragma endregion -Callback and Delegate + + +#pragma region Library and Handle Setup + + // \defgroup mpg123_init mpg123 library and handle setup + // + // Functions to initialise and shutdown the mpg123 library and handles. + // The parameters of handles have workable defaults, you only have to tune them when you want to tune something;-) + // Tip: Use a RVA setting... + // + + private: + mpg123_handle* mh; + + internal: + mpg123(mpg123_handle* mh); + + protected: + ///Finalizer. + ///Cleanly handles mpg123_delete of internal (unmanaged) mpg123 handle. + /// Implementation of CLR Finalize(). + !mpg123(void); + + public: + ///Constructor. + ///Only creates mpg123 object, you must call one of the New() methods to obtain a decoder library handle. + ///Recommended usage: using(mpg123 obj = new mpg123()){ use obj here } + mpg123(void); + + ///Destructor. Used for final object deletion. + ///Calls finalizer for clean disposal of internal (unmanaged) library handles. + /// + /// Implementation of CLR Dispose(). + /// ~Destructor and !Finalizer are the prescribed implementation of Dispose() and Finalize(). + /// See Destructors and Finalizers in Visual C++ + ~mpg123(void); + + ///(mpg123_init) Function to initialise the mpg123 library. + ///This function is not thread-safe. Call it exactly once per process, before any other (possibly threaded) work with the library. + ///Returns MPG123_OK if successful, otherwise an error number. + ///Returns MPG123_OK if successful, otherwise an error number. + static mpg123clr::mpg::ErrorCode __clrcall mpg123_init(void); + + ///(mpg123_exit) Function to close down the mpg123 library. + ///This function is not thread-safe. Call it exactly once per process, before any other (possibly threaded) work with the library. + static void __clrcall mpg123_exit(void); + + ///(mpg123_new) Obtain am mpg123 handle with designated decoder. + ///Returns MPG123_OK or applicable error code. + /// + ///Name of the decoder to attach. + ///MPG123_OK or applicable error code. + mpg123clr::mpg::ErrorCode __clrcall mpg123_new(String ^ decoder); + + ///Obtain an mpg123 handle with default decoder. + ///Returns MPG123_OK or applicable error code. + /// + ///MPG123_OK or applicable error code. + mpg123clr::mpg::ErrorCode __clrcall mpg123_new(void); + + ///Obtain am mpg123 handle with default decoder. + ///Allows use of common parms object for multiple connections. + ///Returns MPG123_OK or applicable error code. + /// + ///Supplied Advanced parameter object. + ///MPG123_OK or applicable error code. + mpg123clr::mpg::ErrorCode __clrcall mpg123_parnew(mpg123clr::advpars^ par); + + ///Obtain am mpg123 handle with designated decoder. + ///Allows use of common parms object for multiple connections. + ///Returns MPG123_OK or applicable error code. + /// + ///Supplied Advanced parameter object. + ///Name of the decoder to attach. + ///MPG123_OK or applicable error code. + mpg123clr::mpg::ErrorCode __clrcall mpg123_parnew(mpg123clr::advpars^ par, String^ decoder); + + ///(mpg123_delete) Delete internal mpg123 handle. + ///The framework will dispose of the object when it goes out of scope - you do not need to explicitly call Delete(). + /// However it is available to allow reuse of this object with successive handles - using New()/Delete() pairs. + /// + void __clrcall mpg123_delete(void); + + public: + + ///Set a specific parameter value. + ///Returns MPG123_OK or applicable error code. + /// + ///Define the parameter to be set. (parms enumeration) + ///Integer value to apply. + ///Real value to apply. + ///MPG123_OK or applicable error code. + mpg123clr::mpg::ErrorCode __clrcall mpg123_param(mpg123clr::mpg::parms type, int val, double fval); + + ///Get a specific parameter value. + ///Returns MPG123_OK or applicable error code. + /// + ///Define the parameter to get. (parms enumeration) + ///Returned integer value. + ///Returned real value. + ///MPG123_OK or applicable error code. + mpg123clr::mpg::ErrorCode __clrcall mpg123_getparam(mpg123clr::mpg::parms type, [Out] int% val, [Out] double% fval); + + ///Query libmpg123 feature. + ///Returns 1 for success, 0 for unimplemented feature. + /// + ///Define the feature to query. (feature_set enumeration) + ///1 for success, 0 for unimplemented feature. + static int __clrcall mpg123_feature(mpg123clr::mpg::feature_set key); + +#pragma endregion -Library and Handle Setup + +#pragma region Internal Helpers + + internal: + array^ StringArrayFromPtr(const char ** ptr); + +#pragma endregion -Internal Helpers + +#pragma region Error Handling + + // \defgroup mpg123_error mpg123 error handling + // + // Functions to get text version of the error numbers and an enumeration + // of the error codes returned by libmpg123. + // + // Most functions operating on a mpg123_handle simply return MPG123_OK on success and MPG123_ERR on failure (setting the internal error variable of the handle to the specific error code). + // Decoding/seek functions may also return message codes MPG123_DONE, MPG123_NEW_FORMAT and MPG123_NEED_MORE (please read up on these on how to react!). + // The positive range of return values is used for "useful" values when appropriate. + // + + public: + + ///Get string describing what error has occured in the context of this object. + ///When a function operating on an mpg123 handle returns MPG123_ERR, you should use this function to check the actual reason. + ///This function will catch mh == NULL and return the message for MPG123_BAD_HANDLE. + ///Returns text representation of last error (incl. None) encountered by this object. + /// + ///Text representation of last error (incl. None) encountered by this object. + String^ __clrcall mpg123_strerror(void); + + ///Get last error encountered in the context of this object. + ///When a function operating on an mpg123 handle returns MPG123_ERR, you should use this function to check the actual reason. + ///This function will catch internal handle == NULL and return MPG123_BAD_HANDLE. + ///Returns ErrorCode for last encountered error. + /// + ///The plain errcode intead of a string of last error (incl. None) encountered by this object. + mpg123clr::mpg::ErrorCode __clrcall mpg123_errcode(void); + +#pragma endregion -Error Handling + +#pragma region Decoder Selection + + // \defgroup mpg123_decoder mpg123 decoder selection + // + // Functions to list and select the available decoders. + // Perhaps the most prominent feature of mpg123: You have several (optimized) decoders to choose from (on x86 and PPC (MacOS) systems, that is). + // + + public: + + ///Obtain list of generally available decoder names (plain 8bit ASCII). + ///Retuns a string array of generally available decoder names (plain 8bit ASCII). + /// + ///A string array of generally available decoder names (plain 8bit ASCII). + array^ __clrcall mpg123_decoders(void); + + ///Obtain list of the decoders supported by the CPU (plain 8bit ASCII). + ///Returns a string array of the decoders supported by the CPU (plain 8bit ASCII). + /// + ///A string array of the decoders supported by the CPU (plain 8bit ASCII). + array^ __clrcall mpg123_supported_decoders(void); + + ///Select the decoder to use. + ///Returns MPG123_OK or applicable error code. + /// + ///Name of the required decoder. (should be in SupportedDecoders list) + ///MPG123_OK or applicable error code. + mpg123clr::mpg::ErrorCode __clrcall mpg123_decoder(String^ name); + + ///Get the currently active decoder engine name. + ///The active decoder engine can vary depening on output constraints, mostly non-resampling, integer output is accelerated via 3DNow and Co. + /// but for other modes a fallback engine kicks in. + ///Note that this can return a decoder that is ony active in the hidden and not available as decoder choice from the outside. + ///Returns the decoder name or String.Empty on error. + /// + ///The decoder name or String.Empty on error. + String^ __clrcall mpg123_current_decoder(void); + +#pragma endregion -Decoder Selection + +#pragma region Output Audio Format + + // \defgroup mpg123_output mpg123 output audio format + // + // Functions to get and select the format of the decoded audio. + // + + public: + + ///Get an array of supported standard sample rates. + ///These are possible native sample rates of MPEG audio files. + /// You can still force mpg123 to resample to a different one, but by default you will only get audio in one of these samplings. + ///Returns array of sample rates. + /// + ///An array of sample rates. + array^ __clrcall mpg123_rates(void); + + ///An array of supported audio encodings. + ///An audio encoding is one of the fully qualified members of mpg.enc + ///Returns array of supported Encodings. + /// + ///An array of supported Encodings. + array^ __clrcall mpg123_encodings(void); + + ///Get the size (in bytes) of one mono sample of the named encoding. + ///Returns the positive size of encoding in bytes, 0 on invalid encoding. + /// + ///The encoding value to analyze. + ///The positive size of encoding in bytes, 0 on invalid encoding. + static int __clrcall mpg123_encsize(mpg123clr::mpg::enc encoding); + + ///Configure mpg123 to accept no output format at all. + ///Use to clear default parameters prior to applying specific settings. + ///Returns MPG123 error codes. + /// + ///MPG123 error codes. + mpg123clr::mpg::ErrorCode __clrcall mpg123_format_none(void); + + ///Configure mpg123 to accept all formats including any custom formats - this is the default. + ///Returns MPG123 error codes. + /// + ///MPG123 error codes. + mpg123clr::mpg::ErrorCode __clrcall mpg123_format_all(void); + + ///Configure detailed output formats. + ///Returns MPG123 error codes. + /// + ///Sample rate (Hertz) + ///Combination of channelcount.stereo and channelcount.mono + ///Combination of accepted encodings for rate and channels e.g. enc.enc_signed16 | enc.enc_ulaw_8 (or 0 for none) + ///MPG123 error codes. + mpg123clr::mpg::ErrorCode __clrcall mpg123_format(int rate, mpg123clr::mpg::channelcount channels, mpg123clr::mpg::enc encodings); + + ///Get available support for supplied rate and encoding. + ///Returns 0 for no support (includes invalid parameters), or combination of channelcount.stereo and channelcount.mono. + /// + ///Sample rate (Hertz) + ///Combination of accepted encodings for rate and channels e.g. enc.enc_signed16 | enc.enc_ulaw_8 (or 0 for none) + ///Returns 0 for no support (includes invalid parameters), or combination of channelcount.stereo and channelcount.mono. + mpg123clr::mpg::channelcount __clrcall mpg123_format_support(int rate, mpg123clr::mpg::enc encoding); + + ///Get current output format. + ///Returns MPG123 error codes. + /// + ///Returns current sample rate (Hertz) + ///Returns combination of channelcount.stereo and channelcount.mono + ///Returns combination of accepted encodings for rate and channels e.g. enc.enc_signed16 | enc.enc_ulaw_8 (or 0 for none) + ///MPG123 error codes. + mpg123clr::mpg::ErrorCode __clrcall mpg123_getformat([Out] int% rate, [Out] mpg123clr::mpg::channelcount% channels, [Out] mpg123clr::mpg::enc% encoding); + +#pragma endregion -Output Audio Format + +#pragma region File Input and Decoding + + // \defgroup mpg123_input mpg123 file input and decoding + // + // Functions for input bitstream and decoding operations. + // Decoding/seek functions may also return message codes MPG123_DONE, MPG123_NEW_FORMAT and MPG123_NEED_MORE (please read up on these on how to react!). + // + + public: + + ///Open and prepare to decode the file specified by ANSI filename. + ///This does not open HTTP urls; the mpg library contains no networking code. + /// If you want to decode internet streams, use Open(fd) or Open(). + /// + ///Returns MPG123 error codes + /// + ///ANSI file path. Accepts ANSI path characters. For Unicode paths use tOpen. + /// NOTE: can be used in Unicode environment as long as wide-char codepages are avoided. + ///MPG123 error codes. + mpg123clr::mpg::ErrorCode __clrcall mpg123_open(String^ path); + + ///Use a previously obtained file descriptor as the bitstream input. + ///NOTE: Close() will NOT close a file opened with this method. + ///Returns MPG123 error codes. + /// + ///File Descriptor of pre required file. + ///MPG123 error codes. + mpg123clr::mpg::ErrorCode __clrcall mpg123_open_fd(int fd); + + ///Use an opaque handle as bitstream input. + ///This works only with the replaced I/O from mpg123_replace_reader_handle()! + ///mpg123_close() will call the cleanup callback for your handle (if you gave one). + ///Returns MPG123 error codes. + /// + ///MPG123 error codes. + mpg123clr::mpg::ErrorCode __clrcall mpg123_open_handle(System::Object^ obj); + + ///Open a new bitstream and prepare for direct feeding. + ///This works together with Decode(); you are responsible for reading and feeding the input bitstream. + ///Returns MPG123 error codes. + /// + ///MPG123 error codes. + mpg123clr::mpg::ErrorCode __clrcall mpg123_open_feed(void); + + ///Closes the source, if the library opened it. + ///Returns MPG123 error codes. + /// + ///MPG123 error codes. + mpg123clr::mpg::ErrorCode __clrcall mpg123_close(void); + + ///Open and prepare to decode the file specified by UNICODE (wide-character) filename. + ///This does not open HTTP urls; the mpg library contains no networking code. + /// If you want to decode internet streams, use Open(fd) or Open(). + /// + ///Returns MPG123 error codes + /// + ///UNICODE wide-character file path. See also ANSI Open(path). + ///MPG123 error codes. + mpg123clr::mpg::ErrorCode __clrcall mpg123_topen(String^ path); + + ///Closes the file opened with tOpen. + ///Returns MPG123 error codes. + /// + ///MPG123 error codes. + mpg123clr::mpg::ErrorCode __clrcall mpg123_tclose(void); + + ///Read from stream and decode. + ///Equivalent to mpg123_read(,,,) + ///Returns MPG123 error codes. (watch out for MPG123_DONE and friends!) + /// + ///Supplied buffer in which to return audio output data. + ///Returns number of actual audio output bytes returned. + ///MPG123 error codes. (watch out for MPG123_DONE and friends!) + mpg123clr::mpg::ErrorCode __clrcall mpg123_read(array^ buffer, [Out] size_t% count); + + ///Read from stream and decode. + ///Equivalent to mpg123_read(,,,) but modified to better support CLR Stream.Read + ///Returns MPG123 error codes. (watch out for MPG123_DONE and friends!) + /// + ///Supplied buffer in which to return audio output data. + ///Offset in buffer at which to begin storing data. + ///Maximum number of bytes to return. + ///Returns number of actual audio output bytes returned. + ///MPG123 error codes. (watch out for MPG123_DONE and friends!) + mpg123clr::mpg::ErrorCode __clrcall mpg123_read(array^ buffer, size_t offset, size_t size, [Out] size_t% count); + + ///Feed data for a stream that has been opened with Open() - (mpg123_open_feed). + ///Equivalent to mpg123_feed(...), it's give and take: You provide the bytestream, mpg123 gives you the decoded samples. + ///Returns MPG123 error codes. + /// + ///Input buffer. + ///Number of input bytes. + ///MPG123 error codes. + mpg123clr::mpg::ErrorCode __clrcall mpg123_feed(array^ inbuffer, size_t size); + + ///Decode MPEG Audio from inmemory to outmemory. + ///This is very close to a drop-in replacement for old mpglib. + ///When you give zero-sized output buffer the input will be parsed until + /// decoded data is available. This enables you to get MPG123_NEW_FORMAT (and query it) + /// without taking decoded data. + ///Think of this function being the union of Read() and Feed() (which it actually is, sort of;-). + /// You can actually always decide if you want those specialized functions in separate steps or one call this one here. + ///Returns MPG123 error codes. (watch out especially for MPG123_NEED_MORE) + /// + ///Input buffer. + ///Number of input bytes. + ///Supplied buffer in which to return audio output data. + ///Size in bytes of buffer. + ///Returns number of actual audio output bytes returned. + ///MPG123 error codes. (watch out especially for MPG123_NEED_MORE) + mpg123clr::mpg::ErrorCode __clrcall mpg123_decode(array^ inbuffer, size_t insize, array^ outbuffer, size_t outsize, [Out] size_t% count); + + ///Decode next MPEG frame to internal buffer or read a frame and return after setting a new format. + ///Returns MPG123 error codes. (watch out for MPG123_NEW_FORMAT) + /// + ///Returns current frame offset. + ///Returns pointer to internal buffer to read the decoded audio from. (Can be NULL for NEW_FORMAT) + ///Returns number of actual audio output bytes ready in the buffer. + ///MPG123 error codes. (watch out for MPG123_NEW_FORMAT) + mpg123clr::mpg::ErrorCode __clrcall mpg123_decode_frame([Out] off_t% num, [Out] IntPtr% audio, [Out] size_t% count); + + ///Decode current MPEG frame to internal buffer. + ///Use with mpg123_framebyframe_next to progress through data. + ///Warning: This is experimental API that might change in future releases! + /// Please watch mpg123 development closely when using it. + ///Returns MPG123 error codes. + /// + ///Returns current frame offset. + ///Returns pointer to internal buffer to read the decoded audio from. (Can be NULL for NEW_FORMAT) + ///Returns number of actual audio output bytes ready in the buffer. + ///MPG123 error codes. + mpg123clr::mpg::ErrorCode __clrcall mpg123_framebyframe_decode([Out] off_t% num, [Out] IntPtr% audio, [Out] size_t% bytes); + + ///Find, read and parse the next mp3 frame. + ///Use with mpg123_framebyframe_decode to obtain frame data. + ///Warning: This is experimental API that might change in future releases! + /// Please watch mpg123 development closely when using it. + ///Returns MPG123 error codes. (watch out for MPG123_NEW_FORMAT) + /// + ///MPG123 error codes. (watch out for MPG123_NEW_FORMAT) + mpg123clr::mpg::ErrorCode __clrcall mpg123_framebyframe_next(void); + +#pragma endregion -File Input and Decoding + +#pragma region Position and Seeking + + // \defgroup mpg123_seek mpg123 position and seeking + // + // Functions querying and manipulating position in the decoded audio bitstream. + // The position is measured in decoded audio samples, or MPEG frame offset for the specific functions. + // If gapless code is in effect, the positions are adjusted to compensate the skipped padding/delay - meaning, you should not care about that at all and just use the position defined for the samples you get out of the decoder;-) + // The general usage is modelled after stdlib's ftell() and fseek(). + // Especially, the whence parameter for the seek functions has the same meaning as the one for fseek() and needs the same constants from stdlib.h: + // - SEEK_SET: set position to (or near to) specified offset + // - SEEK_CUR: change position by offset from now + // - SEEK_END: set position to offset from end + // + // Note that sample-accurate seek only works when gapless support has been enabled at compile time; seek is frame-accurate otherwise. + // Also, really sample-accurate seeking (meaning that you get the identical sample value after seeking compared to plain decoding up to the position) is only guaranteed when you do not mess with the position code by using MPG123_UPSPEED, MPG123_DOWNSPEED or MPG123_START_FRAME. The first two mainly should cause trouble with NtoM resampling, but in any case with these options in effect, you have to keep in mind that the sample offset is not the same as counting the samples you get from decoding since mpg123 counts the skipped samples, too (or the samples played twice only once)! + // Short: When you care about the sample position, don't mess with those parameters;-) + // Also, seeking is not guaranteed to work for all streams (underlying stream may not support it). + // + + public: + + ///Get the current position in samples. On the next read, you'd get that sample. + ///Returns the current sample position. + /// + ///The current sample position. + long long __clrcall mpg123_tell(); + + ///Get the frame number that the next read will give you data from. + ///Returns the current frame number position. + /// + ///The current frame number position. + long long __clrcall mpg123_tellframe(); + + ///Get the current byte offset in the input stream. + ///Returns the current byte offset. + /// + ///The current byte offset. + long long __clrcall mpg123_tell_stream(); + + ///Seek to a desired sample offset. + ///Returns the resulting offset >= 0 or error/message code. + /// + ///The distance to move. + ///(whence) The relative location to move from.(SeekOrigin.Begin, SeekOrigin.Current, SeekOrigin.End) + ///Returns the resulting offset >= 0 or error/message code. + long long __clrcall mpg123_seek(long long offset, SeekOrigin origin); + + ///Seek to a desired sample offset in data feeding mode. + ///This just prepares things to be right only if you ensure that the next chunk of input data will be from input_offset byte position. + ///Returns the resulting offset >= 0 or error/message code. + /// + ///The distance to move. + ///(whence) The relative location to move from.(SeekOrigin.Begin, SeekOrigin.Current, SeekOrigin.End) + ///Returns the position it expects to be at the next time data is fed to Decode(). + ///Returns the resulting offset >= 0 or error/message code. + long long __clrcall mpg123_feedseek(long long offset, SeekOrigin origin, [Out] long long% input_offset); + + ///Seek to a desired MPEG frame index. + ///Returns the resulting offset >= 0 or error/message code. + /// + ///The numberof frames to move. + ///(whence) The relative location to move from.(SEEK_SET, SEEK_CUR or SEEK_END) + ///Returns the resulting offset >= 0 or error/message code. + long long __clrcall mpg123_seek_frame(long long frameoffset, SeekOrigin origin); + + ///Seek to an absolute MPEG frame offset corresponding to an offset in seconds. + ///This assumes that the samples per frame do not change in the file/stream, which is a good assumption for any sane file/stream only. + ///Returns the resulting offset >= 0 or error/message code. + /// + ///The absolute time offset required. + ///Returns the resulting offset >= 0 or error/message code. + long long __clrcall mpg123_timeframe(double seconds); + + ///Get a copy of the frame index table. Somewhat equivalent to mpg123_index(,,). + ///The library requests not to modify table values. Since this is a copy, modification is meaningless - it has no effect on library routines. + ///NOTE: The returned index table value types are Int64 independant of library build. + ///Returns MPG123 error codes. + /// + ///Returns array of source file position offsets (not output samples). Length of array is equivalent to mpg123_index "fill" parameter. + ///Returns number of MPEG frames per index entry. + ///MPG123 error codes. + mpg123clr::mpg::ErrorCode __clrcall mpg123_index([Out] array^% index, [Out] long long% step); + + ///Get a pointer to the frame index table. Equivalent to mpg123_index(,,). + ///Do not modify table values unless you really know what you are doing! + ///NOTE: The returned index table value types may be Int32 or Int64 depending on library build. + ///Returns MPG123 error codes. + /// + ///Returns pointer to source file position offset index array (not output samples). + ///Returns number of MPEG frames per index entry. + ///Returns number of recorded index offsets; size of the array. + ///MPG123 error codes. + mpg123clr::mpg::ErrorCode __clrcall mpg123_index([Out] IntPtr% indexarr, [Out] long long% step, [Out] size_t% fill); + + ///Get information about current and remaining frames/seconds. Equivalent to mpg123_position(,,,,,,). + ///WARNING: This function is there because of special usage by standalone mpg123 and may be removed in the final version of libmpg123! + ///You provide an offset (in frames) from now and a number of output bytes + /// served by libmpg123 but not yet played. You get the projected current frame + /// and seconds, as well as the remaining frames/seconds. This does _not_ care + /// about skipped samples due to gapless playback. + ///Returns MPG123 error codes. + /// + ///Offset (in frames) from now. + ///Number of output bytes served by library but not yet played. + ///Returns projected current frame. + ///Returns projected frames remaining. + ///Returns projected current seconds. + ///Returns projected seconds remaining. + ///MPG123 error codes. + mpg123clr::mpg::ErrorCode __clrcall mpg123_position(long long frameoffset, long long bufferedbytes, + [Out] long long% currentframe, [Out] long long% framesleft, + [Out] double% currentseconds, [Out] double% secondsleft); + +#pragma endregion -Position and Seeking + +#pragma region Volume and Equalizer + + // \defgroup mpg123_voleq mpg123 volume and equalizer + // + + public: + + ///Set the 32 Band Audio Equalizer settings. + ///Returns MPG123 error codes. + /// + ///Can be MPG123_LEFT, MPG123_RIGHT or MPG123_LEFT|MPG123_RIGHT for both. (enum mpg.channels) + ///The equaliser band to change (from 0 to 31) + ///The (linear) adjustment factor to be applied. + ///MPG123 error codes. + mpg123clr::mpg::ErrorCode __clrcall mpg123_eq(mpg123clr::mpg::channels channel, int band, double fval); + + ///Get the 32 Band Audio Equalizer settings. + ///Rreturns the (linear) adjustment factor. + /// + ///Can be MPG123_LEFT, MPG123_RIGHT or MPG123_LEFT|MPG123_RIGHT for (arithmetic mean of) both. (enum mpg.channels) + ///The equaliser band to get (from 0 to 31) + ///The (linear) adjustment factor. + double __clrcall mpg123_geteq(mpg123clr::mpg::channels channel, int band); + + ///Reset the 32 Band Audio Equalizer settings to flat. + ///Returns MPG123 error codes. + /// + ///MPG123 error codes. + mpg123clr::mpg::ErrorCode __clrcall mpg123_reset_eq(); + + ///Set the absolute output volume including the RVA setting. + ///Returns MPG123 error codes. + /// + ///The (linear) adjustment factor to be applied, volume < 0 just applies (a possibly changed) RVA setting. + ///MPG123 error codes. + mpg123clr::mpg::ErrorCode __clrcall mpg123_volume(double volume); + + ///Adjust output volume including the RVA setting. + ///Returns MPG123 error codes. + /// + ///The (linear) adjustment factor to be applied. + ///MPG123 error codes. + mpg123clr::mpg::ErrorCode __clrcall mpg123_volume_change(double change); + + ///Get the current volume setting, the actual value due to RVA, and the RVA adjustment itself. + ///Returns MPG123 error codes. + /// + ///Returns the current linear volume factor. (not percent) + ///Returns the actual linear volume factor due to RVA. (not percent) + ///Returns the RVA adjustment in decibels. + ///MPG123 error codes. + mpg123clr::mpg::ErrorCode __clrcall mpg123_getvolume([Out] double% basevol, [Out] double% really, [Out] double% rva_db); + +#pragma endregion -Volume and Equalizer + +#pragma region Status and Information + + // \defgroup mpg123_status mpg123 status and information + // + // + // + + [StructLayout(LayoutKind::Sequential, CharSet=CharSet::Ansi, Pack=1)] + ref struct mpeg_frameinfo + { + mpg123clr::mpg::mpeg_version version; // The MPEG version (1.0/2.0/2.5). + int layer; // The MPEG Audio Layer (MP1/MP2/MP3). + long rate; // The sampling rate in Hz. + mpg123clr::mpg::mpeg_mode mode; // The audio mode (Mono, Stereo, Joint-stero, Dual Channel). + int mode_ext; // The mode extension bit flag. + int framesize; // The size of the frame (in bytes). + mpg123clr::mpg::mpeg_flags flags; // MPEG Audio flag bits. + int emphasis; // The emphasis type. + int bitrate; // Bitrate of the frame (kbps). + int abr_rate; // The target average bitrate. + mpg123clr::mpg::mpeg_vbr vbr; // The VBR mode. + }; + + ///Get the frame information about the MPEG audio bitstream. + ///Returns MPG123 error codes. + /// + ///Returns the frame information. + ///MPG123 error codes. + mpg123clr::mpg::ErrorCode __clrcall mpg123_info([Out]mpeg_frameinfo^% finfo); + + ///Get the frame information about the MPEG audio bitstream. + ///SafeInfo uses "safe" managed structures but is somewhat slower than Info(). + /// Recommend using Info() unless it gives specific problems. + ///Returns MPG123 error codes. + /// + ///Returns the frame information. + ///MPG123 error codes. + mpg123clr::mpg::ErrorCode __clrcall mpg123_safeinfo([Out]mpeg_frameinfo^% finfo); + + ///Get the safe output buffer size for all cases (when you want to replace the internal buffer). + ///Returns safe buffer size. + /// + ///Safe buffer size. + static size_t __clrcall mpg123_safe_buffer(void); + + ///Make a full parsing scan of each frame in the file. + ///ID3 tags are found. An accurate length value is stored. Seek index will be filled. + /// A seek back to current position is performed. + ///This function refuses work when stream is not seekable. + ///Returns MPG123 error codes. + /// + ///MPG123 error codes. + mpg123clr::mpg::ErrorCode __clrcall mpg123_scan(void); + + ///Return, if possible, the full (expected) length of current track in samples. + ///Returns length (>= 0) or MPG123_ERR if there is no length guess possible. (Multiply by BlockAlign for byte-count) + /// + ///Length (>= 0) or MPG123_ERR if there is no length guess possible. (Multiply by BlockAlign for byte-count) + long long __clrcall mpg123_length(void); + + ///Override the value for file size in bytes. + ///Useful for getting sensible track length values in feed mode or for HTTP streams. + ///Returns MPG123 error codes. + /// + ///Size to set. + ///MPG123 error codes. + mpg123clr::mpg::ErrorCode __clrcall mpg123_set_filesize(long long size); + + ///Time Per Frame (seconds). + ///Returns time per frame in seconds ( < 0 is error ). + /// + ///Time per frame in seconds ( < 0 is error ). + double __clrcall mpg123_tpf(void); + + ///Get and reset the clip count. + ///Returns the number of previously encountered clips. + /// + ///The number of previously encountered clips. + long __clrcall mpg123_clip(); + + ///Get various current decoder/stream state information. + ///Returns MPG123 error codes. + /// + ///The key to identify the information to get (enum mpg.state). + ///Returns integer values. + ///Returns real values. + ///MPG123 error codes. + mpg123clr::mpg::ErrorCode __clrcall mpg123_getstate(mpg123clr::mpg::state key, [Out] int% val, [Out] double% fval); + +#pragma endregion -Status and Information + +#pragma region Metadata Handling + + // \defgroup mpg123_metadata mpg123 metadata handling + // + // Functions to retrieve the metadata from MPEG Audio files and streams. + // Also includes string handling functions. + // + + // clr - much of the metadata has been relocated to class files for maintainability + // see string.h, text.h, id3v1.h and id3v2.h + // + + ///Query if there is (new) meta info, be it ID3 or ICY (or something new in future). + ///Returns a combination of flags. (enum id3.id3check) + /// + ///Returns a combination of flags. (enum id3.id3check) + mpg123clr::id3::id3check __clrcall mpg123_meta_check(void); /* On error (no valid handle) just 0 is returned. */ + + ///Get ID3 data. Data structures may change on any (next) read/decode function call. + ///v1 and/or v2 may be Empty if no corresponding data exists. + ///Returns MPG123_OK or MPG123_ERR. + /// + ///Returns mpg123id3v1 data structure containing ID3v1 data (usually from end of file). + ///Returns mpg123id3v2 data structure containing ID3v2 data (usually - but not restricted to - from beginning of file). + ///Returns MPG123_OK or MPG123_ERR. + mpg123clr::mpg::ErrorCode __clrcall mpg123_id3([Out]id3::mpg123id3v1^% v1, [Out]id3::mpg123id3v2^% v2); + + ///Get ICY meta data. Data structure may change on any (next) read/decode function call. + ///Icy_meta may be null if no corresponding data exists. + ///Returns MPG123_OK or MPG123_ERR. + /// + ///Returns ICY meta data (windows-1252 encoded). + ///Returns MPG123_OK or MPG123_ERR. + mpg123clr::mpg::ErrorCode __clrcall mpg123_icy([Out]IntPtr% icy_meta); /* same for ICY meta string */ + + ///Decode from windows-1252 (the encoding ICY metainfo used) to UTF-8. + ///Returns byte array of utf8 encoded data. + /// + ///ICY meta data in ICY encoding. + ///Returns byte array of utf8 encoded data. + static array^ __clrcall mpg123_icy2utf8(IntPtr icy_text); + +#pragma endregion -Metadata Handling + +#pragma region Advanced Parameter API + + // \defgroup mpg123_advpar mpg123 advanced parameter API + // + // Direct access to a parameter set without full handle around it. + // Possible uses: + // - Influence behaviour of library _during_ initialization of handle (MPG123_VERBOSE). + // - Use one set of parameters for multiple handles. + // + // The functions for handling mpg123_pars (mpg123_par() and mpg123_fmt() + // family) directly return a fully qualified mpg123 error code, the ones + // operating on full handles normally MPG123_OK or MPG123_ERR, storing the + // specific error code itself inside the handle. + // + + // see advanced.h + +#pragma endregion -Advanced Parameter API + +#pragma region Low Level I/O + + // \defgroup mpg123_lowio mpg123 low level I/O + // You may want to do tricky stuff with I/O that does not work with mpg123's default file access or you want to make it decode into your own pocket... + // + + ///Replace default internal buffer with user-supplied buffer. + ///Instead of working on it's own private buffer, mpg123 will directly use the one you provide for storing decoded audio. + ///The data buffer should be pinned before calling this function. + ///Returns MPG123_OK or MPG123 error code. + /// + ///Pointer to supplied buffer. + ///Size of supplied buffer. + ///MPG123_OK or MPG123_ERR code. + mpg123clr::mpg::ErrorCode __clrcall mpg123_replace_buffer(IntPtr data, size_t size); + + ///The max size of one frame's decoded output with current settings. + ///Use that to determine an appropriate minimum buffer size for decoding one frame. + ///Returns size of required buffer. + /// + ///Size of required buffer. + size_t __clrcall mpg123_outblock(void); + + ///Replace low-level stream access functions; read and lseek as known in POSIX. + ///You can use this to make any fancy file opening/closing yourself, + /// using mpg123_open_fd() to set the file descriptor for your read/lseek (doesn't need to be a 'real' file descriptor...). + ///Setting a function to NULL means that the default internal function is used (active from next Open call onward). + ///////////////////////// + ///Always returns MPG123_OK. + /// + ///Delegate for read function, null for default. + ///Delegate for lseek function, null for default. + ///Always MPG123_OK. + mpg123clr::mpg::ErrorCode __clrcall mpg123_replace_reader(ReadDelegate^ r_read, SeekDelegate^ r_lseek); + + /////////////////////////////////////// + mpg123clr::mpg::ErrorCode __clrcall mpg123_replace_reader_handle(ReadHandleDelegate^ rh_read, SeekHandleDelegate^ rh_lseek, CleanupHandleDelegate^ rh_clean); + + private: + + // Defered internal implementation of ReplaceReader - action is defered until next 'Open' operation. + void __clrcall _ReplaceReader(void); + + public: + + // These functions are not part of the mpg123clr wrapper but are included as proof of concept + // of how to implement callback functions. + + ///Proof of concept posix-like lseek function. + ///This routine should not normally be called from your callback routine, it is a sample function + /// showing how such a callback could be implemented. + /// + ///File descriptor. + ///Required position. + ///Whence. + ///Resultant position. + static long PosixSeek(int fd, long offset, int origin) + { + long ret = _lseek(fd, offset, origin); + return ret; + } + + ///Proof of concept posix-like read function. + ///This routine should not normally be called from your callback routine, it is a sample function + /// showing how such a callback could be implemented. + /// + ///File descriptor. + ///Buffer address. + ///Size of buffer. + ///Actual bytes read. + static int PosixRead(int fd, void*buf, unsigned int count) + { + int ret = _read(fd, buf, count); + return ret; + } + +#pragma endregion -Low Level I/O + + }; + +} \ No newline at end of file diff --git a/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/mpg123clr.rc b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/mpg123clr.rc new file mode 100644 index 0000000..be9f220 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/mpg123clr.rc @@ -0,0 +1,102 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,13,0,0 + PRODUCTVERSION 1,13,0,0 + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "mpg123 Project" + VALUE "FileDescription", "mpg123clr Dynamic Link Library" + VALUE "FileVersion", "1, 13, 0, 0" + VALUE "InternalName", "mpg123clr" + VALUE "LegalCopyright", "2009-2011 - the mpg123 project" + VALUE "OriginalFilename", "mpg123clr.dll" + VALUE "ProductName", "mpg123 Common Language Runtime Dynamic Link Library" + VALUE "ProductVersion", "1, 13, 0, 0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/mpg123clr.vcproj b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/mpg123clr.vcproj new file mode 100644 index 0000000..8c1f2bf --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/mpg123clr.vcproj @@ -0,0 +1,328 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/resource.h b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/resource.h new file mode 100644 index 0000000..250c6a2 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/resource.h @@ -0,0 +1,14 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by mpg123clr.rc + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 101 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/stdafx.cpp b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/stdafx.cpp new file mode 100644 index 0000000..42146a7 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// mpg123clr.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff --git a/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/stdafx.h b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/stdafx.h new file mode 100644 index 0000000..8a4c94f --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/stdafx.h @@ -0,0 +1,38 @@ +/* + mpg123clr: MPEG Audio Decoder library Common Language Runtime version. + + copyright 2009 by Malcolm Boczek - free software under the terms of the LGPL 2.1 + mpg123clr.dll is a derivative work of libmpg123 - all original mpg123 licensing terms apply. + + All rights to this work freely assigned to the mpg123 project. +*/ +/* + libmpg123: MPEG Audio Decoder library + + copyright 1995-2008 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + +*/ +/* + 1.8.1.0 04-Aug-09 Initial release. +*/ + +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#pragma once + +#include "targetver.h" + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +// Windows Header Files: +#include + + + +// TODO: reference additional headers your program requires here + +struct mpg123_pars_struct{}; +struct mpg123_handle_struct{}; \ No newline at end of file diff --git a/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/string.cpp b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/string.cpp new file mode 100644 index 0000000..cc27096 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/string.cpp @@ -0,0 +1,166 @@ +/* + mpg123clr: MPEG Audio Decoder library Common Language Runtime version. + + copyright 2009-2011 by Malcolm Boczek - free software under the terms of the LGPL 2.1 + mpg123clr.dll is a derivative work of libmpg123 - all original mpg123 licensing terms apply. + + All rights to this work freely assigned to the mpg123 project. +*/ +/* + libmpg123: MPEG Audio Decoder library + + copyright 1995-2011 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + +*/ +/* + 1.8.1.0 04-Aug-09 Initial release. + 1.9.0.0 24-Sep-09 Function names harmonized with libmpg123 (mb) + 1.9.0.0 01-Oct-09 Technical cleanup - subst nullptr for NULL (mb) + 1.13.0.0 13-Jan-11 release match - added strlen (mb) +*/ + +#include "StdAfx.h" +#include "string.h" + +// Constructor for overlaid instance (instanced) +mpg123clr::mpg123str::mpg123str(void) +{ + instanced = true; + sb = new ::mpg123_string; + mpg123_init_string(); + +} + +// Constructor for mpg123_string handle instance (referenced) +mpg123clr::mpg123str::mpg123str(mpg123_string* sb) +{ + instanced = false; + this->sb = sb; +} + +mpg123clr::mpg123str::mpg123str(const char* str) +{ + instanced = true; + sb = new ::mpg123_string; + mpg123_init_string(); + + ::mpg123_set_string(sb, str); +} + +// Destructor cleans up all resources +mpg123clr::mpg123str::~mpg123str(void) +{ + // clean up code to release managed resources + // ... + + // call Finalizer to clean up unmanaged resources + this->!mpg123str(); +} + +// Finalizer cleans up unmanaged resources +mpg123clr::mpg123str::!mpg123str(void) +{ + if (instanced && (sb != nullptr)) mpg123_free_string(); +} + +int mpg123clr::mpg123str::mpg123_add_string(String ^ s) +{ + return mpg123_add_substring(s, 0, s->Length); +} + +int mpg123clr::mpg123str::mpg123_add_substring(String ^ s, int from, int count) +{ + // convert CLR string to CLI string + using namespace Runtime::InteropServices; + const char* chars = (const char*)(Marshal::StringToHGlobalAnsi(s->Substring(from, count))).ToPointer(); + + // add mpg123_string info + int ret = ::mpg123_add_string(sb, chars); + + // free temporary memory + Marshal::FreeHGlobal(IntPtr((void*)chars)); + + return ret; +} + +int mpg123clr::mpg123str::mpg123_copy_string(mpg123str^ to) +{ + return ::mpg123_copy_string(sb, to->sb); +} + +void mpg123clr::mpg123str::mpg123_free_string() +{ + ::mpg123_free_string(sb); +} + +int mpg123clr::mpg123str::mpg123_grow_string(int newSize) +{ + return ::mpg123_grow_string(sb, newSize); +} + +int mpg123clr::mpg123str::mpg123_resize_string(int newSize) +{ + return ::mpg123_resize_string(sb, newSize); +} + +void mpg123clr::mpg123str::mpg123_init_string() +{ + ::mpg123_init_string(sb); +} + +int mpg123clr::mpg123str::mpg123_set_string(String ^ s) +{ + return mpg123_set_substring(s, 0, s->Length); +} + +int mpg123clr::mpg123str::mpg123_set_substring(String ^ s, int from, int count) +{ + // convert CLR string to CLI string + using namespace Runtime::InteropServices; + const char* chars = (const char*)(Marshal::StringToHGlobalAnsi(s->Substring(from, count))).ToPointer(); + + // set mpg123_string info + int ret = ::mpg123_set_string(sb, chars); + + // free temporary memory + Marshal::FreeHGlobal(IntPtr((void*)chars)); + + return ret; +} + +long long mpg123clr::mpg123str::mpg123_strlen(bool utf8) +{ + // TODO: determine use for utf8 vs ansi + return ::mpg123_strlen(sb, utf8); +} + +int mpg123clr::mpg123str::Fill::get() +{ + // WARN 4267 - clr limited to 32bit-length-size strings by PtrToStringAnsi + return (int)sb->fill; +} + +int mpg123clr::mpg123str::Size::get() +{ + // WARN 4267 - clr limited to 32bit-length-size strings by PtrToStringAnsi + return (int)sb->size; +} + +String^ mpg123clr::mpg123str::Text::get() +{ + if (sb->fill == 0) return gcnew String(""); + + // WARN 4267 - clr limited to 32bit-length-size strings by PtrToStringAnsi + return Marshal::PtrToStringAnsi((IntPtr)sb->p, (int)strnlen(sb->p, sb->fill)); +} + +mpg123clr::mpg123str::text_encoding mpg123clr::mpg123str::mpg123_enc_from_id3(unsigned char id3_enc_byte) +{ + return (mpg123clr::mpg123str::text_encoding) ::mpg123_enc_from_id3(id3_enc_byte); +} + +int mpg123clr::mpg123str::mpg123_store_utf8(text_encoding enc, const unsigned char *source, size_t source_size) +{ + return ::mpg123_store_utf8(sb, (mpg123_text_encoding)enc, source, source_size); +} diff --git a/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/string.h b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/string.h new file mode 100644 index 0000000..19bb862 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/string.h @@ -0,0 +1,265 @@ +/* + mpg123clr: MPEG Audio Decoder library Common Language Runtime version. + + copyright 2009-2011 by Malcolm Boczek - free software under the terms of the LGPL 2.1 + mpg123clr.dll is a derivative work of libmpg123 - all original mpg123 licensing terms apply. + + All rights to this work freely assigned to the mpg123 project. +*/ +/* + libmpg123: MPEG Audio Decoder library + + copyright 1995-2011 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + +*/ +/* + 1.8.1.0 04-Aug-09 Initial release. + 1.9.0.0 16-Sep-09 1.9.0 Update - add enc_from_id3, store_utf8 + 1.9.0.0 24-Sep-09 Function names harmonized with libmpg123 (mb) + 1.13.0.0 13-Jan-11 release match - added strlen (mb) +*/ + +#pragma once + +#pragma warning(disable : 4635) +#include "mpg123.h" +#pragma warning(default : 4635) + +#include +#include + +#include +using namespace std; +using namespace System; +using namespace System::Runtime::InteropServices; + +namespace mpg123clr +{ + + // Recommended usage when creating reference type on the managed heap (not using stack semantics + // for reference types...) [see Destructors and Finalizers in Visual C++] + // + // A ^ myA = gcnew A; + // try + // { + // use myA + // } + // finally + // { + // delete myA; + // } + + + ///Wrapper for mpg123_string. + ///mpg123str can be used as both (publicly) an instance object and (privately) a reference object. + /// Construction and Finalizer operations perform differently depending on the instance type... + /// + ///Instanced: i.e. new mpg123str(); + /// Normal operation of any object. Construction initializes memory and Destruction frees memory. + /// + ///Referenced: i.e. new mpg123str(sb); + /// Construction and Destruction have no effect on the referenced object, mpg123str objects may be freely + /// made and deleted without affecting the referenced object. + /// + ///However! + /// + ///All methods operate on the referenced object (and NOT a copy of the object), the underlying mpg123_string + /// is directly modified in situ. Therefore the referenced object can be initialized and disposed by + /// explicitly calling Init() and Free(). + ///The length of strings is limited to a 32bit value due to limitations of the CLI marshaler. + /// + /// + [StructLayout(LayoutKind::Sequential, CharSet=CharSet::Ansi)] + public ref struct mpg123str + { + + public: + + ///text_encoding enumeration. + enum class text_encoding + { + text_unknown = mpg123_text_unknown, /// Unkown encoding... mpg123_id3_encoding can return that on invalid codes. + text_utf8 = mpg123_text_utf8, /// UTF-8 + text_latin1 = mpg123_text_latin1, /// ISO-8859-1. Note that sometimes latin1 in ID3 is abused for totally different encodings. + text_icy = mpg123_text_icy, /// ICY metadata encoding, usually CP-1252 but we take it as UTF-8 if it qualifies as such. + text_cp1252 = mpg123_text_cp1252, /// Really CP-1252 without any guessing. + text_utf16 = mpg123_text_utf16, /// Some UTF-16 encoding. The last of a set of leading BOMs (byte order mark) rules. + /// When there is no BOM, big endian ordering is used. Note that UCS-2 qualifies as UTF-8 when + /// you don't mess with the reserved code points. If you want to decode little endian data + /// without BOM you need to prepend 0xff 0xfe yourself. + text_utf16bom = mpg123_text_utf16bom, /// Just an alias for UTF-16, ID3v2 has this as distinct code. + text_utf16be = mpg123_text_utf16be, /// Another alias for UTF16 from ID3v2. Note, that, because of the mess that is reality, + /// BOMs are used if encountered. There really is not much distinction between the UTF16 types for mpg123 + /// One exception: Since this is seen in ID3v2 tags, leading null bytes are skipped for all other UTF16 + /// types (we expect a BOM before real data there), not so for utf16be! + text_max = mpg123_text_max /// Placeholder for the maximum encoding value. + }; + + ///id3_enc enumeration. + enum class id3_enc + { + id3_latin1 = mpg123_id3_latin1, /// Note: This sometimes can mean anything in practice... + id3_utf16bom = mpg123_id3_utf16bom, /// UTF16, UCS-2 ... it's all the same for practical purposes. + id3_utf16be = mpg123_id3_utf16be, /// Big-endian UTF-16, BOM see note for mpg123_text_utf16be. + id3_utf8 = mpg123_id3_utf8, /// Our lovely overly ASCII-compatible 8 byte encoding for the world. + id3_enc_max = mpg123_id3_enc_max /// Placeholder to check valid range of encoding byte. + }; + + + private: + mpg123_string* sb; + bool instanced; + + internal: + ///Reference Constructor. Does nothing to referenced mpg123_string structure. + ///Reference objects may be freely created and deleted without affecting the underlying mpg123_string object. + /// However, operations on the referenced object do modify the object in-situ (i.e. 'this' is not a 'copy'), and + /// the referenced object may be explicitly initialized and disposed by calling the appropriate methods. (Init() and Free()) + ///Recommended usage: using(mpg123str obj = new mpg123str(sb)){ use obj here } + /// + mpg123str(mpg123_string* sb); + + ///Internal Constructor. + ///Only used on empty fields. + /// + mpg123str(const char* str); + + protected: + ///Finalizer. + ///Cleanly handles mpg123_free_string of instanced mpg123_string object. + ///Does not dispose referenced mpg123_string object. Referenced objects may be explicitly disposed by using Free(). + /// + /// Implementation of CLR Finalize(). + !mpg123str(void); + + public: + ///Constructor, also initializes underlying mpg123_string structure. + ///Instanced objects automatically dispose of underlying mpg123_string object. + ///Recommended usage: using(mpg123str obj = new mpg123str(sb)){ use obj here } + /// + mpg123str(void); + + ///Destructor. Used for final object deletion. + ///Instance objects call the finalizer for clean disposal of internal mpg123_string object. + ///Reference objects may be freely deleted without affecting the underlying mpg123_string object. + /// However, the referenced object may be explicitly disposed by calling Free() + /// + // Implementation of CLR Dispose(). + // ~Destructor and !Finalizer are the prescribed implementation of Dispose() and Finalize(). + // See Destructors and Finalizers in Visual C++ + ~mpg123str(void); + + ///Append a C# string to this mpg123str. + ///Returns 0 on error, 1 on success. + /// + ///String to be appended. + ///0 on error, 1 on success. + int __clrcall mpg123_add_string(String ^ s); + + ///Append a C# substring to this mpg123str. + ///Returns 0 on error, 1 on success. + /// + ///String to be appended. + ///String offset to copy from. + ///Number of characters to copy. (a null byte is always appended) + ///0 on error, 1 on success. + int __clrcall mpg123_add_substring(String ^ s, int from, int count); + + ///Copy the contents of this string to another. + ///Returns 0 on error, 1 on success. + /// + ///Where to copy this string to. + ///0 on error, 1 on success. + int __clrcall mpg123_copy_string(mpg123str^ to); + + ///Free-up mempory for an existing mpg123_string. + /// + void __clrcall mpg123_free_string(void); + + ///Increase size of a mpg123_string if necessary (it may stay larger). + ///Returns 0 on error, 1 on success. + /// + ///Required size. + ///0 on error, 1 on success. + int __clrcall mpg123_grow_string(int newSize); + + ///Change the size of a mpg123_string. + ///Returns 0 on error, 1 on success. + /// + ///Required size. + ///0 on error, 1 on success. + int __clrcall mpg123_resize_string(int newSize); + + ///Create and allocate memory for a new mpg123_string. + /// + void __clrcall mpg123_init_string(void); + + ///Set the contents to a C# string. + ///Returns 0 on error, 1 on success. + /// + ///String to be applied. + ///0 on error, 1 on success. + int __clrcall mpg123_set_string(String ^ s); + + ///Set the contents to a C# substring. + ///Returns 0 on error, 1 on success. + /// + ///String to be applied. + ///String offset to copy from. + ///Number of characters to copy. (a null byte is always appended) + ///0 on error, 1 on success. + int __clrcall mpg123_set_substring(String ^ s, int from, int count); + + ///Count characters in a mpg123 string (non-null bytes or UTF-8 characters). + ///Even with the fill property, the character count is not obvious as there could be multiple trailing null bytes. + ///Returns the character count. + /// + ///Flag to tell if the string is in utf8 encoding. + ///Character count. + long long __clrcall mpg123_strlen(bool utf8); + + ///Get the number of used bytes. (including closing zero byte). + ///Property returns the number of used bytes. + /// + ///The number of used bytes. + property int Fill{int __clrcall get();} // property + + ///Get the number of bytes allocated. + ///Property returns the number of bytes allocated. + /// + ///The number of bytes allocated. + property int Size{int __clrcall get();} // property + + ///Get a C# string representation of the mpg123str. + ///Property returns C# string text. + /// + ///C# string text. + property String^ Text{String^ __clrcall get();} + +// 1.9.0.0 +add + + ///Convert ID3 encoding byte to mpg123 encoding index. + ///Returns the text_encoding enum of the converted value. + /// + ///The ID3 encoding byte to be converted. + ///The text_encoding enum of the converted value. + static text_encoding __clrcall mpg123_enc_from_id3(unsigned char id3_enc_byte); + + ///Store text data in string, after converting to UTF-8 from indicated encoding. + ///A prominent error can be that you provided an unknown encoding value, or this build of libmpg123 lacks support for certain encodings (ID3 or ICY stuff missing). + /// Also, you might want to take a bit of care with preparing the data; for example, strip leading zeroes (I have seen that). + ///CLR - e.g. UnicodeEncoding(true, true) works with utf16be. + ///Returns 0 on error, 1 on success (on error, mpg123_free_string is called on sb). + /// + ///Mpg123 text encoding value. + ///Source buffer with plain unsigned bytes. + ///Number of bytes in the source buffer. + ///0 on error, 1 on success (on error, mpg123_free_string is called on sb). + int __clrcall mpg123_store_utf8(text_encoding enc, const unsigned char *source, size_t source_size); + +// 1.9.0.0 -add + + }; + +} diff --git a/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/targetver.h b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/targetver.h new file mode 100644 index 0000000..f583181 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/targetver.h @@ -0,0 +1,24 @@ +#pragma once + +// The following macros define the minimum required platform. The minimum required platform +// is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run +// your application. The macros work by enabling all features available on platform versions up to and +// including the version specified. + +// Modify the following defines if you have to target a platform prior to the ones specified below. +// Refer to MSDN for the latest info on corresponding values for different platforms. +#ifndef WINVER // Specifies that the minimum required platform is Windows Vista. +#define WINVER 0x0600 // Change this to the appropriate value to target other versions of Windows. +#endif + +#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. +#define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. +#endif + +#ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows 98. +#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. +#endif + +#ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 7.0. +#define _WIN32_IE 0x0700 // Change this to the appropriate value to target other versions of IE. +#endif diff --git a/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/text.cpp b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/text.cpp new file mode 100644 index 0000000..e07ffd8 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/text.cpp @@ -0,0 +1,67 @@ +/* + mpg123clr: MPEG Audio Decoder library Common Language Runtime version. + + copyright 2009 by Malcolm Boczek - free software under the terms of the LGPL 2.1 + mpg123clr.dll is a derivative work of libmpg123 - all original mpg123 licensing terms apply. + + All rights to this work freely assigned to the mpg123 project. +*/ +/* + libmpg123: MPEG Audio Decoder library + + copyright 1995-2008 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + +*/ +/* + 1.8.1.0 04-Aug-09 Initial release. +*/ + +#include "StdAfx.h" +#include "text.h" + +mpg123clr::mpg123text::mpg123text(void) +{ +} + +mpg123clr::mpg123text::mpg123text(mpg123_text* sb) +{ + this->sb = sb; +} + +// Destructor +mpg123clr::mpg123text::~mpg123text(void) +{ + // clean up code to release managed resources + // ... + + // call Finalizer to clean up unmanaged resources + this->!mpg123text(); +} + +// Finalizer +mpg123clr::mpg123text::!mpg123text(void) +{ +} + +String^ mpg123clr::mpg123text::lang::get() +{ + return Marshal::PtrToStringAnsi((IntPtr)sb->lang, (int)strnlen(sb->lang, 3)); +} + +String^ mpg123clr::mpg123text::id::get() +{ + return Marshal::PtrToStringAnsi((IntPtr)sb->id, (int)strnlen(sb->id, 4)); +} + +String^ mpg123clr::mpg123text::description::get() +{ + mpg123str^ str = gcnew mpg123str(&sb->description); + return str->Text; +} + +String^ mpg123clr::mpg123text::text::get() +{ + mpg123str^ str = gcnew mpg123str(&sb->text); + return str->Text; +} diff --git a/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/text.h b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/text.h new file mode 100644 index 0000000..32160cd --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2008clr/mpg123clr/text.h @@ -0,0 +1,111 @@ +/* + mpg123clr: MPEG Audio Decoder library Common Language Runtime version. + + copyright 2009 by Malcolm Boczek - free software under the terms of the LGPL 2.1 + mpg123clr.dll is a derivative work of libmpg123 - all original mpg123 licensing terms apply. + + All rights to this work freely assigned to the mpg123 project. +*/ +/* + libmpg123: MPEG Audio Decoder library + + copyright 1995-2008 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + +*/ +/* + 1.8.1.0 04-Aug-09 Initial release. +*/ + +#pragma once + +#pragma warning(disable : 4635) +#include "mpg123.h" +#pragma warning(default : 4635) + +#include "string.h" + +#include +#include + +#include +using namespace std; +using namespace System; +using namespace System::Runtime::InteropServices; + +namespace mpg123clr +{ + // Recommended usage when creating reference type on the managed heap (not using stack semantics + // for reference types...) [see Destructors and Finalizers in Visual C++] + // + // A ^ myA = gcnew A; + // try + // { + // use myA + // } + // finally + // { + // delete myA; + // } + + + ///Wrapper for mpg123_text. + [StructLayout(LayoutKind::Sequential, CharSet=CharSet::Ansi)] + public ref struct mpg123text + { + private: + mpg123_text* sb; + + internal: + ///Constructor. + ///Recommended usage: only as tracking marker to existing mpg123_text objects. + mpg123text(void); + + ///Reference Constructor. + ///Recommended usage: only as tracking marker to existing mpg123_text objects. + mpg123text(mpg123_text* sb); + + protected: + ///Finalizer. + ///Does nothing. mpg123text can only be instanced as a reference to an existing mpg123_text object (which is responsible for its own disposal. + /// Implementation of CLR Finalize(). + !mpg123text(void); + + public: + ///Destructor. Used for final object deletion. + ///Calls finalizer. + /// + /// Implementation of CLR Dispose(). + /// ~Destructor and !Finalizer are the prescribed implementation of Dispose() and Finalize(). + /// See Destructors and Finalizers in Visual C++ + ~mpg123text(void); + + ///Get a string representation of the 3-letter language code. + ///Only COMM and USLT have a language element. + ///Property returns string representation of the 3-letter language code. + /// + ///String representation of the 3-letter language code. + property String^ lang{String^ __clrcall get();} + + ///Get a string representation of the ID3v2 field id. (i.e. TALB, TPE2 etc.) + ///Property returns string representation of the ID3v2 field id. (i.e. TALB, TPE2 etc.) + /// + ///String representation of the ID3v2 field id. (i.e. TALB, TPE2 etc.) + property String^ id{String^ __clrcall get();} + + ///Get a string representation of the description field. + ///Only COMM and TXXX have a description element. + ///Property returns string representation of the description field. + /// + ///String representation of the description field. + property String^ description{String^ __clrcall get();} + + ///Get a string representation of the ID3 tag text. + ///This is for COMM, TXXX and all the other text fields. + ///Property returns string representation of the ID3 tag text. + /// + ///String representation of the ID3 tag text. + property String^ text{String^ __clrcall get();} + + }; +} diff --git a/deps/mpg123/ports/MSVC++/2010/dump_seekindex/dump_seekindex.vcxproj b/deps/mpg123/ports/MSVC++/2010/dump_seekindex/dump_seekindex.vcxproj new file mode 100644 index 0000000..6e4a036 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2010/dump_seekindex/dump_seekindex.vcxproj @@ -0,0 +1,90 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {3C75D302-5DA2-49DD-A27A-5EB199D6933B} + Win32Proj + dump_seekindex + + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + true + $(ProjectDir)$(Configuration)\ + ..\..\..\MSVC++;..\..\..\..\src\libmpg123;$(IncludePath) + + + false + $(ProjectDir)$(Configuration)\ + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + + + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + + + Console + true + true + true + + + + + + + + {67caa87b-7cf1-4f93-bb67-21c513f40803} + + + + + + \ No newline at end of file diff --git a/deps/mpg123/ports/MSVC++/2010/dump_seekindex/dump_seekindex.vcxproj.filters b/deps/mpg123/ports/MSVC++/2010/dump_seekindex/dump_seekindex.vcxproj.filters new file mode 100644 index 0000000..72e22ea --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2010/dump_seekindex/dump_seekindex.vcxproj.filters @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/deps/mpg123/ports/MSVC++/2010/feedseek/feedseek.vcxproj b/deps/mpg123/ports/MSVC++/2010/feedseek/feedseek.vcxproj new file mode 100644 index 0000000..60f0fb2 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2010/feedseek/feedseek.vcxproj @@ -0,0 +1,95 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + + + + + {67caa87b-7cf1-4f93-bb67-21c513f40803} + + + + {AE56D9D0-ECBA-44CD-943A-E530F6C46E15} + Win32Proj + feedseek + + + + Application + Unicode + + + Application + true + Unicode + + + + + + + + + + + + + true + ..\..\..\MSVC++;..\..\..\..\src\libmpg123;$(IncludePath) + $(ProjectDir)$(Configuration)\ + + + false + ..\..\..\MSVC++;..\..\..\..\src\libmpg123;$(IncludePath) + $(ProjectDir)$(Configuration)\ + + + + + + Level3 + true + EditAndContinue + Disabled + EnableFastChecks + MultiThreadedDebugDLL + WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + + + + + Level3 + + + ProgramDatabase + MaxSpeed + MultiThreadedDLL + true + true + WIN32;_CRT_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + + + + \ No newline at end of file diff --git a/deps/mpg123/ports/MSVC++/2010/feedseek/feedseek.vcxproj.filters b/deps/mpg123/ports/MSVC++/2010/feedseek/feedseek.vcxproj.filters new file mode 100644 index 0000000..569f255 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2010/feedseek/feedseek.vcxproj.filters @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/deps/mpg123/ports/MSVC++/2010/libmpg123/libmpg123.vcxproj b/deps/mpg123/ports/MSVC++/2010/libmpg123/libmpg123.vcxproj new file mode 100644 index 0000000..f42b38d --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2010/libmpg123/libmpg123.vcxproj @@ -0,0 +1,960 @@ + + + + + Debug_Generic_Dll + Win32 + + + Debug_Generic + Win32 + + + Debug_x86_Dll_Minimal + Win32 + + + Debug_x86_Dll + Win32 + + + Debug_x86 + Win32 + + + Release_Generic_Dll + Win32 + + + Release_Generic + Win32 + + + Release_x86_Dll_Minimal + Win32 + + + Release_x86_Dll + Win32 + + + Release_x86 + Win32 + + + + {67CAA87B-7CF1-4F93-BB67-21C513F40803} + libmpg123 + + + + DynamicLibrary + Unicode + true + + + DynamicLibrary + Unicode + + + DynamicLibrary + Unicode + true + + + DynamicLibrary + Unicode + + + StaticLibrary + Unicode + true + + + StaticLibrary + Unicode + + + DynamicLibrary + Unicode + true + + + DynamicLibrary + Unicode + + + StaticLibrary + Unicode + true + + + StaticLibrary + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.21006.1 + $(ProjectDir)Debug\ + Debug\ + $(ProjectDir)Release\ + Release\ + $(ProjectDir)Debug\ + Debug\ + $(ProjectDir)Release\ + Release\ + $(ProjectDir)Debug\ + Debug\ + $(ProjectDir)Release\ + Release\ + $(ProjectDir)Debug\ + Debug\ + $(ProjectDir)Release\ + Release\ + false + $(ProjectDir)Debug\ + Debug\ + $(ProjectDir)Release\ + Release\ + false + + + + Disabled + ../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;_DEBUG;%(PreprocessorDefinitions) + false + + + EnableFastChecks + MultiThreadedDebugDLL + false + Level3 + ProgramDatabase + CompileAsC + 4996;%(DisableSpecificWarnings) + + + $(ProjectDir)Debug\$(ProjectName).lib + + + + + MaxSpeed + AnySuitable + true + Speed + true + ../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;%(PreprocessorDefinitions) + + + MultiThreadedDLL + false + false + StreamingSIMDExtensions + Precise + false + Level3 + ProgramDatabase + CompileAsC + 4996;%(DisableSpecificWarnings) + + + $(ProjectDir)Release\$(ProjectName).lib + + + + + Disabled + ../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;_DEBUG;BUILD_MPG123_DLL;ACCURATE_ROUNDING;IEEE_FLOAT;%(PreprocessorDefinitions) + false + + + EnableFastChecks + MultiThreadedDebugDLL + false + Level3 + false + ProgramDatabase + CompileAsC + 4996;%(DisableSpecificWarnings) + + + $(ProjectDir)Debug\$(ProjectName).dll + $(ProjectDir)\Debug;%(AdditionalLibraryDirectories) + true + true + 0x63000000 + false + true + + + + + MaxSpeed + AnySuitable + true + Speed + true + ../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;BUILD_MPG123_DLL;%(PreprocessorDefinitions) + + + MultiThreadedDLL + false + false + StreamingSIMDExtensions + Precise + false + Level3 + false + ProgramDatabase + CompileAsC + 4996;%(DisableSpecificWarnings) + + + $(ProjectDir)Release\$(ProjectName).dll + true + 0x63000000 + false + true + + + + + Disabled + ../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;%(PreprocessorDefinitions) + false + + + EnableFastChecks + MultiThreadedDebugDLL + false + Level3 + ProgramDatabase + CompileAsC + 4996;%(DisableSpecificWarnings) + + + cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct36_3dnow.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct36_3dnow.o" "$(ProjectDir)..\libmpg123\Debug\dct36_3dnow.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnowext.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.o" "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.o" "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnowext.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct64_3dnowext.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct64_3dnowext.o" "$(ProjectDir)..\libmpg123\Debug\dct64_3dnowext.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_mmx.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct64_mmx.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct64_mmx.o" "$(ProjectDir)..\libmpg123\Debug\dct64_mmx.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_sse.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct64_sse.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct64_sse.o" "$(ProjectDir)..\libmpg123\Debug\dct64_sse.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_sse_float.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct64_sse_float.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct64_sse_float.o" "$(ProjectDir)..\libmpg123\Debug\dct64_sse_float.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\equalizer_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\equalizer_3dnow.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\equalizer_3dnow.o" "$(ProjectDir)..\libmpg123\Debug\equalizer_3dnow.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\getcpuflags.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\getcpuflags.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\getcpuflags.o" "$(ProjectDir)..\libmpg123\Debug\getcpuflags.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_3dnow.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_3dnow.o" "$(ProjectDir)..\libmpg123\Debug\synth_3dnow.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_3dnowext.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_3dnowext.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_3dnowext.o" "$(ProjectDir)..\libmpg123\Debug\synth_3dnowext.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_i586.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_i586.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_i586.o" "$(ProjectDir)..\libmpg123\Debug\synth_i586.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_mmx.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_mmx.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_mmx.o" "$(ProjectDir)..\libmpg123\Debug\synth_mmx.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_sse.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_sse.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_sse.o" "$(ProjectDir)..\libmpg123\Debug\synth_sse.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_sse_float.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_sse_float.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_sse_float.o" "$(ProjectDir)..\libmpg123\Debug\synth_sse_float.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_stereo_sse_float.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_stereo_sse_float.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_stereo_sse_float.o" "$(ProjectDir)..\libmpg123\Debug\synth_stereo_sse_float.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\tabinit_mmx.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\tabinit_mmx.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\tabinit_mmx.o" "$(ProjectDir)..\libmpg123\Debug\tabinit_mmx.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_sse_accurate.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_sse_accurate.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_sse_accurate.o" "$(ProjectDir)..\libmpg123\Debug\synth_sse_accurate.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_sse_s32.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_sse_s32.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_sse_s32.o" "$(ProjectDir)..\libmpg123\Debug\synth_sse_s32.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_stereo_sse_accurate.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_stereo_sse_accurate.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_stereo_sse_accurate.o" "$(ProjectDir)..\libmpg123\Debug\synth_stereo_sse_accurate.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_stereo_sse_s32.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_stereo_sse_s32.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_stereo_sse_s32.o" "$(ProjectDir)..\libmpg123\Debug\synth_stereo_sse_s32.asm" + + + + dct36_3dnow.o;dct36_3dnowext.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies) + $(ProjectDir)Debug\$(ProjectName).lib + $(ProjectDir)\Debug;%(AdditionalLibraryDirectories) + + + + + MaxSpeed + AnySuitable + true + Speed + true + ../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;%(PreprocessorDefinitions) + + + MultiThreadedDLL + false + false + StreamingSIMDExtensions + Precise + false + Level3 + ProgramDatabase + CompileAsC + 4996;%(DisableSpecificWarnings) + + + cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct36_3dnow.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct36_3dnow.o" "$(ProjectDir)..\libmpg123\Release\dct36_3dnow.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnowext.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.o" "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.o" "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnowext.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct64_3dnowext.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct64_3dnowext.o" "$(ProjectDir)..\libmpg123\Release\dct64_3dnowext.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_mmx.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct64_mmx.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct64_mmx.o" "$(ProjectDir)..\libmpg123\Release\dct64_mmx.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_sse.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct64_sse.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct64_sse.o" "$(ProjectDir)..\libmpg123\Release\dct64_sse.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_sse_float.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct64_sse_float.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct64_sse_float.o" "$(ProjectDir)..\libmpg123\Release\dct64_sse_float.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\equalizer_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Release\equalizer_3dnow.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\equalizer_3dnow.o" "$(ProjectDir)..\libmpg123\Release\equalizer_3dnow.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\getcpuflags.S" /nologo > "$(ProjectDir)..\libmpg123\Release\getcpuflags.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\getcpuflags.o" "$(ProjectDir)..\libmpg123\Release\getcpuflags.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_3dnow.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_3dnow.o" "$(ProjectDir)..\libmpg123\Release\synth_3dnow.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_3dnowext.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_3dnowext.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_3dnowext.o" "$(ProjectDir)..\libmpg123\Release\synth_3dnowext.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_i586.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_i586.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_i586.o" "$(ProjectDir)..\libmpg123\Release\synth_i586.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_mmx.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_mmx.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_mmx.o" "$(ProjectDir)..\libmpg123\Release\synth_mmx.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_sse.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_sse.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_sse.o" "$(ProjectDir)..\libmpg123\Release\synth_sse.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_sse_float.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_sse_float.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_sse_float.o" "$(ProjectDir)..\libmpg123\Release\synth_sse_float.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_stereo_sse_float.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_stereo_sse_float.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_stereo_sse_float.o" "$(ProjectDir)..\libmpg123\Release\synth_stereo_sse_float.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\tabinit_mmx.S" /nologo > "$(ProjectDir)..\libmpg123\Release\tabinit_mmx.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\tabinit_mmx.o" "$(ProjectDir)..\libmpg123\Release\tabinit_mmx.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_sse_accurate.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_sse_accurate.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_sse_accurate.o" "$(ProjectDir)..\libmpg123\Release\synth_sse_accurate.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_sse_s32.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_sse_s32.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_sse_s32.o" "$(ProjectDir)..\libmpg123\Release\synth_sse_s32.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_stereo_sse_accurate.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_stereo_sse_accurate.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_stereo_sse_accurate.o" "$(ProjectDir)..\libmpg123\Release\synth_stereo_sse_accurate.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_stereo_sse_s32.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_stereo_sse_s32.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_stereo_sse_s32.o" "$(ProjectDir)..\libmpg123\Release\synth_stereo_sse_s32.asm" + + + + dct36_3dnow.o;dct36_3dnowext.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies) + $(ProjectDir)Release\$(ProjectName).lib + $(ProjectDir)\Release;%(AdditionalLibraryDirectories) + + + + + Disabled + ../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;BUILD_MPG123_DLL;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;_BIND_TO_CURRENT_VCLIBS_VERSION=1;%(PreprocessorDefinitions) + false + + + EnableFastChecks + MultiThreadedDebugDLL + Precise + false + Level3 + false + ProgramDatabase + CompileAsC + 4996;%(DisableSpecificWarnings) + + + cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct36_3dnow.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct36_3dnow.o" "$(ProjectDir)..\libmpg123\Debug\dct36_3dnow.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnowext.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.o" "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.o" "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnowext.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct64_3dnowext.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct64_3dnowext.o" "$(ProjectDir)..\libmpg123\Debug\dct64_3dnowext.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_mmx.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct64_mmx.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct64_mmx.o" "$(ProjectDir)..\libmpg123\Debug\dct64_mmx.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_sse.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct64_sse.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct64_sse.o" "$(ProjectDir)..\libmpg123\Debug\dct64_sse.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_sse_float.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct64_sse_float.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct64_sse_float.o" "$(ProjectDir)..\libmpg123\Debug\dct64_sse_float.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\equalizer_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\equalizer_3dnow.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\equalizer_3dnow.o" "$(ProjectDir)..\libmpg123\Debug\equalizer_3dnow.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\getcpuflags.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\getcpuflags.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\getcpuflags.o" "$(ProjectDir)..\libmpg123\Debug\getcpuflags.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_3dnow.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_3dnow.o" "$(ProjectDir)..\libmpg123\Debug\synth_3dnow.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_3dnowext.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_3dnowext.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_3dnowext.o" "$(ProjectDir)..\libmpg123\Debug\synth_3dnowext.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_i586.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_i586.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_i586.o" "$(ProjectDir)..\libmpg123\Debug\synth_i586.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_mmx.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_mmx.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_mmx.o" "$(ProjectDir)..\libmpg123\Debug\synth_mmx.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_sse.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_sse.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_sse.o" "$(ProjectDir)..\libmpg123\Debug\synth_sse.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_sse_float.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_sse_float.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_sse_float.o" "$(ProjectDir)..\libmpg123\Debug\synth_sse_float.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_stereo_sse_float.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_stereo_sse_float.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_stereo_sse_float.o" "$(ProjectDir)..\libmpg123\Debug\synth_stereo_sse_float.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\tabinit_mmx.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\tabinit_mmx.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\tabinit_mmx.o" "$(ProjectDir)..\libmpg123\Debug\tabinit_mmx.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_sse_accurate.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_sse_accurate.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_sse_accurate.o" "$(ProjectDir)..\libmpg123\Debug\synth_sse_accurate.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_sse_s32.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_sse_s32.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_sse_s32.o" "$(ProjectDir)..\libmpg123\Debug\synth_sse_s32.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_stereo_sse_accurate.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_stereo_sse_accurate.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_stereo_sse_accurate.o" "$(ProjectDir)..\libmpg123\Debug\synth_stereo_sse_accurate.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_stereo_sse_s32.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_stereo_sse_s32.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_stereo_sse_s32.o" "$(ProjectDir)..\libmpg123\Debug\synth_stereo_sse_s32.asm" + + + + dct36_3dnow.o;dct36_3dnowext.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies) + $(ProjectDir)Debug\$(ProjectName).dll + $(ProjectDir)\Debug;%(AdditionalLibraryDirectories) + true + true + 0x63000000 + true + false + + + + + + + + + MaxSpeed + AnySuitable + true + Speed + true + ../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;BUILD_MPG123_DLL;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;_BIND_TO_CURRENT_VCLIBS_VERSION=1;%(PreprocessorDefinitions) + + + MultiThreadedDLL + false + false + StreamingSIMDExtensions + Precise + false + Level3 + false + ProgramDatabase + CompileAsC + 4996;%(DisableSpecificWarnings) + + + cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct36_3dnow.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct36_3dnow.o" "$(ProjectDir)..\libmpg123\Release\dct36_3dnow.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnowext.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.o" "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.o" "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnowext.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct64_3dnowext.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct64_3dnowext.o" "$(ProjectDir)..\libmpg123\Release\dct64_3dnowext.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_mmx.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct64_mmx.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct64_mmx.o" "$(ProjectDir)..\libmpg123\Release\dct64_mmx.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_sse.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct64_sse.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct64_sse.o" "$(ProjectDir)..\libmpg123\Release\dct64_sse.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_sse_float.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct64_sse_float.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct64_sse_float.o" "$(ProjectDir)..\libmpg123\Release\dct64_sse_float.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\equalizer_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Release\equalizer_3dnow.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\equalizer_3dnow.o" "$(ProjectDir)..\libmpg123\Release\equalizer_3dnow.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\getcpuflags.S" /nologo > "$(ProjectDir)..\libmpg123\Release\getcpuflags.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\getcpuflags.o" "$(ProjectDir)..\libmpg123\Release\getcpuflags.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_3dnow.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_3dnow.o" "$(ProjectDir)..\libmpg123\Release\synth_3dnow.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_3dnowext.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_3dnowext.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_3dnowext.o" "$(ProjectDir)..\libmpg123\Release\synth_3dnowext.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_i586.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_i586.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_i586.o" "$(ProjectDir)..\libmpg123\Release\synth_i586.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_mmx.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_mmx.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_mmx.o" "$(ProjectDir)..\libmpg123\Release\synth_mmx.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_sse.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_sse.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_sse.o" "$(ProjectDir)..\libmpg123\Release\synth_sse.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_sse_float.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_sse_float.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_sse_float.o" "$(ProjectDir)..\libmpg123\Release\synth_sse_float.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_stereo_sse_float.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_stereo_sse_float.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_stereo_sse_float.o" "$(ProjectDir)..\libmpg123\Release\synth_stereo_sse_float.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\tabinit_mmx.S" /nologo > "$(ProjectDir)..\libmpg123\Release\tabinit_mmx.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\tabinit_mmx.o" "$(ProjectDir)..\libmpg123\Release\tabinit_mmx.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_sse_accurate.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_sse_accurate.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_sse_accurate.o" "$(ProjectDir)..\libmpg123\Release\synth_sse_accurate.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_sse_s32.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_sse_s32.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_sse_s32.o" "$(ProjectDir)..\libmpg123\Release\synth_sse_s32.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_stereo_sse_accurate.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_stereo_sse_accurate.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_stereo_sse_accurate.o" "$(ProjectDir)..\libmpg123\Release\synth_stereo_sse_accurate.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_stereo_sse_s32.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_stereo_sse_s32.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_stereo_sse_s32.o" "$(ProjectDir)..\libmpg123\Release\synth_stereo_sse_s32.asm" + + + + dct36_3dnow.o;dct36_3dnowext.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies) + $(ProjectDir)Release\$(ProjectName).dll + $(ProjectDir)\Release;%(AdditionalLibraryDirectories) + true + 0x63000000 + false + true + + + + + + + + + Disabled + ../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;BUILD_MPG123_DLL;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;NO_STRING;NO_ID3V2;NO_ICY;NO_DOWNSAMPLE;_BIND_TO_CURRENT_VCLIBS_VERSION=1;%(PreprocessorDefinitions) + false + + + EnableFastChecks + MultiThreadedDebugDLL + Precise + false + Level3 + false + ProgramDatabase + CompileAsC + 4996;%(DisableSpecificWarnings) + + + cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct36_3dnow.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct36_3dnow.o" "$(ProjectDir)..\libmpg123\Debug\dct36_3dnow.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnowext.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.o" "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.o" "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnowext.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct64_3dnowext.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct64_3dnowext.o" "$(ProjectDir)..\libmpg123\Debug\dct64_3dnowext.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_mmx.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct64_mmx.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct64_mmx.o" "$(ProjectDir)..\libmpg123\Debug\dct64_mmx.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_sse.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct64_sse.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct64_sse.o" "$(ProjectDir)..\libmpg123\Debug\dct64_sse.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_sse_float.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\dct64_sse_float.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct64_sse_float.o" "$(ProjectDir)..\libmpg123\Debug\dct64_sse_float.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\equalizer_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\equalizer_3dnow.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\equalizer_3dnow.o" "$(ProjectDir)..\libmpg123\Debug\equalizer_3dnow.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\getcpuflags.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\getcpuflags.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\getcpuflags.o" "$(ProjectDir)..\libmpg123\Debug\getcpuflags.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_3dnow.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_3dnow.o" "$(ProjectDir)..\libmpg123\Debug\synth_3dnow.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_3dnowext.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_3dnowext.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_3dnowext.o" "$(ProjectDir)..\libmpg123\Debug\synth_3dnowext.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_i586.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_i586.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_i586.o" "$(ProjectDir)..\libmpg123\Debug\synth_i586.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_mmx.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_mmx.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_mmx.o" "$(ProjectDir)..\libmpg123\Debug\synth_mmx.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_sse.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_sse.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_sse.o" "$(ProjectDir)..\libmpg123\Debug\synth_sse.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_sse_float.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_sse_float.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_sse_float.o" "$(ProjectDir)..\libmpg123\Debug\synth_sse_float.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_stereo_sse_float.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_stereo_sse_float.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_stereo_sse_float.o" "$(ProjectDir)..\libmpg123\Debug\synth_stereo_sse_float.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\tabinit_mmx.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\tabinit_mmx.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\tabinit_mmx.o" "$(ProjectDir)..\libmpg123\Debug\tabinit_mmx.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_sse_accurate.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_sse_accurate.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_sse_accurate.o" "$(ProjectDir)..\libmpg123\Debug\synth_sse_accurate.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_sse_s32.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_sse_s32.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_sse_s32.o" "$(ProjectDir)..\libmpg123\Debug\synth_sse_s32.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_stereo_sse_accurate.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_stereo_sse_accurate.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_stereo_sse_accurate.o" "$(ProjectDir)..\libmpg123\Debug\synth_stereo_sse_accurate.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_stereo_sse_s32.S" /nologo > "$(ProjectDir)..\libmpg123\Debug\synth_stereo_sse_s32.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\synth_stereo_sse_s32.o" "$(ProjectDir)..\libmpg123\Debug\synth_stereo_sse_s32.asm" + + + + dct36_3dnow.o;dct36_3dnowext.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies) + $(ProjectDir)Debug\$(ProjectName).dll + $(ProjectDir)\Debug;%(AdditionalLibraryDirectories) + true + true + 0x63000000 + true + false + + + + + + + + + MaxSpeed + AnySuitable + true + Speed + true + ../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;BUILD_MPG123_DLL;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;NO_STRING;NO_ID3V2;NO_ICY;NO_DOWNSAMPLE;_BIND_TO_CURRENT_VCLIBS_VERSION=1;%(PreprocessorDefinitions) + + + MultiThreadedDLL + false + false + StreamingSIMDExtensions + Precise + false + Level3 + false + ProgramDatabase + CompileAsC + 4996;%(DisableSpecificWarnings) + + + cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct36_3dnow.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct36_3dnow.o" "$(ProjectDir)..\libmpg123\Release\dct36_3dnow.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnowext.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.o" "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.o" "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnowext.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct64_3dnowext.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct64_3dnowext.o" "$(ProjectDir)..\libmpg123\Release\dct64_3dnowext.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_mmx.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct64_mmx.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct64_mmx.o" "$(ProjectDir)..\libmpg123\Release\dct64_mmx.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_sse.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct64_sse.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct64_sse.o" "$(ProjectDir)..\libmpg123\Release\dct64_sse.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_sse_float.S" /nologo > "$(ProjectDir)..\libmpg123\Release\dct64_sse_float.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct64_sse_float.o" "$(ProjectDir)..\libmpg123\Release\dct64_sse_float.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\equalizer_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Release\equalizer_3dnow.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\equalizer_3dnow.o" "$(ProjectDir)..\libmpg123\Release\equalizer_3dnow.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\getcpuflags.S" /nologo > "$(ProjectDir)..\libmpg123\Release\getcpuflags.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\getcpuflags.o" "$(ProjectDir)..\libmpg123\Release\getcpuflags.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_3dnow.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_3dnow.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_3dnow.o" "$(ProjectDir)..\libmpg123\Release\synth_3dnow.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_3dnowext.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_3dnowext.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_3dnowext.o" "$(ProjectDir)..\libmpg123\Release\synth_3dnowext.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_i586.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_i586.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_i586.o" "$(ProjectDir)..\libmpg123\Release\synth_i586.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_mmx.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_mmx.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_mmx.o" "$(ProjectDir)..\libmpg123\Release\synth_mmx.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_sse.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_sse.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_sse.o" "$(ProjectDir)..\libmpg123\Release\synth_sse.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_sse_float.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_sse_float.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_sse_float.o" "$(ProjectDir)..\libmpg123\Release\synth_sse_float.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_stereo_sse_float.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_stereo_sse_float.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_stereo_sse_float.o" "$(ProjectDir)..\libmpg123\Release\synth_stereo_sse_float.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\tabinit_mmx.S" /nologo > "$(ProjectDir)..\libmpg123\Release\tabinit_mmx.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\tabinit_mmx.o" "$(ProjectDir)..\libmpg123\Release\tabinit_mmx.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_sse_accurate.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_sse_accurate.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_sse_accurate.o" "$(ProjectDir)..\libmpg123\Release\synth_sse_accurate.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_sse_s32.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_sse_s32.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_sse_s32.o" "$(ProjectDir)..\libmpg123\Release\synth_sse_s32.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_stereo_sse_accurate.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_stereo_sse_accurate.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_stereo_sse_accurate.o" "$(ProjectDir)..\libmpg123\Release\synth_stereo_sse_accurate.asm" + +cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\synth_stereo_sse_s32.S" /nologo > "$(ProjectDir)..\libmpg123\Release\synth_stereo_sse_s32.asm" +yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\synth_stereo_sse_s32.o" "$(ProjectDir)..\libmpg123\Release\synth_stereo_sse_s32.asm" + + + + dct36_3dnow.o;dct36_3dnowext.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies) + $(ProjectDir)Release\$(ProjectName).dll + $(ProjectDir)\Release;%(AdditionalLibraryDirectories) + true + 0x63000000 + false + true + + + + + + + + + + + true + true + true + true + + + true + true + true + true + true + true + true + true + true + true + + + + + + + true + true + + + + + + + + + + + + + + + + + + true + true + true + true + true + true + true + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/deps/mpg123/ports/MSVC++/2010/mpg123.sln b/deps/mpg123/ports/MSVC++/2010/mpg123.sln new file mode 100644 index 0000000..cce053f --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2010/mpg123.sln @@ -0,0 +1,38 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "feedseek", "feedseek\feedseek.vcxproj", "{AE56D9D0-ECBA-44CD-943A-E530F6C46E15}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmpg123", "libmpg123\libmpg123.vcxproj", "{67CAA87B-7CF1-4F93-BB67-21C513F40803}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scan", "scan\scan.vcxproj", "{1B03F4FD-A10A-4F99-A476-BE7FFD1CB508}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dump_seekindex", "dump_seekindex\dump_seekindex.vcxproj", "{3C75D302-5DA2-49DD-A27A-5EB199D6933B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AE56D9D0-ECBA-44CD-943A-E530F6C46E15}.Debug|Win32.ActiveCfg = Debug|Win32 + {AE56D9D0-ECBA-44CD-943A-E530F6C46E15}.Debug|Win32.Build.0 = Debug|Win32 + {AE56D9D0-ECBA-44CD-943A-E530F6C46E15}.Release|Win32.ActiveCfg = Release|Win32 + {AE56D9D0-ECBA-44CD-943A-E530F6C46E15}.Release|Win32.Build.0 = Release|Win32 + {67CAA87B-7CF1-4F93-BB67-21C513F40803}.Debug|Win32.ActiveCfg = Debug_x86|Win32 + {67CAA87B-7CF1-4F93-BB67-21C513F40803}.Debug|Win32.Build.0 = Debug_x86|Win32 + {67CAA87B-7CF1-4F93-BB67-21C513F40803}.Release|Win32.ActiveCfg = Release_x86|Win32 + {67CAA87B-7CF1-4F93-BB67-21C513F40803}.Release|Win32.Build.0 = Release_x86|Win32 + {1B03F4FD-A10A-4F99-A476-BE7FFD1CB508}.Debug|Win32.ActiveCfg = Debug|Win32 + {1B03F4FD-A10A-4F99-A476-BE7FFD1CB508}.Debug|Win32.Build.0 = Debug|Win32 + {1B03F4FD-A10A-4F99-A476-BE7FFD1CB508}.Release|Win32.ActiveCfg = Release|Win32 + {1B03F4FD-A10A-4F99-A476-BE7FFD1CB508}.Release|Win32.Build.0 = Release|Win32 + {3C75D302-5DA2-49DD-A27A-5EB199D6933B}.Debug|Win32.ActiveCfg = Debug|Win32 + {3C75D302-5DA2-49DD-A27A-5EB199D6933B}.Debug|Win32.Build.0 = Debug|Win32 + {3C75D302-5DA2-49DD-A27A-5EB199D6933B}.Release|Win32.ActiveCfg = Release|Win32 + {3C75D302-5DA2-49DD-A27A-5EB199D6933B}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deps/mpg123/ports/MSVC++/2010/scan/scan.vcxproj b/deps/mpg123/ports/MSVC++/2010/scan/scan.vcxproj new file mode 100644 index 0000000..6fc5f91 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2010/scan/scan.vcxproj @@ -0,0 +1,93 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + + + + + {67caa87b-7cf1-4f93-bb67-21c513f40803} + + + + {1B03F4FD-A10A-4F99-A476-BE7FFD1CB508} + Win32Proj + scan + + + + Application + Unicode + + + Application + true + Unicode + + + + + + + + + + + + + true + $(ProjectDir)$(Configuration)\ + ..\..\..\MSVC++;..\..\..\..\src\libmpg123;$(IncludePath) + + + false + $(ProjectDir)$(Configuration)\ + + + + NotUsing + Level3 + true + EditAndContinue + Disabled + EnableFastChecks + MultiThreadedDebugDLL + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + $(IntDir) + + + Console + true + + + + + Level3 + NotUsing + ProgramDatabase + MaxSpeed + MultiThreadedDLL + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + + + + \ No newline at end of file diff --git a/deps/mpg123/ports/MSVC++/2010/scan/scan.vcxproj.filters b/deps/mpg123/ports/MSVC++/2010/scan/scan.vcxproj.filters new file mode 100644 index 0000000..aa03bdf --- /dev/null +++ b/deps/mpg123/ports/MSVC++/2010/scan/scan.vcxproj.filters @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/deps/mpg123/ports/MSVC++/CMP3Stream/INCLUDE/CORE/CORE_FileIn.H b/deps/mpg123/ports/MSVC++/CMP3Stream/INCLUDE/CORE/CORE_FileIn.H new file mode 100644 index 0000000..9a569bb --- /dev/null +++ b/deps/mpg123/ports/MSVC++/CMP3Stream/INCLUDE/CORE/CORE_FileIn.H @@ -0,0 +1,15 @@ +// ------------------------------------------------------------------------------------------------ + +#pragma once + +// ------------------------------------------------------------------------------------------------ + +protected: + +::FILE *m_pFile; + +PBYTE m_pucMemData; +DWORD m_dwLength; +DWORD m_dwReadPos; + +// ------------------------------------------------------------------------------------------------ diff --git a/deps/mpg123/ports/MSVC++/CMP3Stream/INCLUDE/CORE/SourceFilter_MP3.H b/deps/mpg123/ports/MSVC++/CMP3Stream/INCLUDE/CORE/SourceFilter_MP3.H new file mode 100644 index 0000000..c9471a8 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/CMP3Stream/INCLUDE/CORE/SourceFilter_MP3.H @@ -0,0 +1,139 @@ +// ------------------------------------------------------------------------------------------------ + +#pragma once + +// ------------------------------------------------------------------------------------------------ + +#ifdef _DEBUG +#pragma comment(lib, "libMPG123_d.lib") +#else +#pragma comment(lib, "libMPG123.lib") +#endif + +// ------------------------------------------------------------------------------------------------ + +#include "../DShowBase/streams.h" + +#include +#include + +#include "../../libMPG123/MPG123.H" + +#include + +// ------------------------------------------------------------------------------------------------ + +#define WAVE_HEADER_LENGTH 44 + +// ------------------------------------------------------------------------------------------------ + +#define MP3_DECODE_LEN 0x4000 + +#define MP3_DECODE_BUF_LEN 0x8000 + +// ------------------------------------------------------------------------------------------------ + +namespace IIEP +{ + class CMP3Stream : public CAsyncStream + { + public: + + CMP3Stream(void); + ~CMP3Stream(void); + + void SetSeekFlag(void); + + bool Open(const WORD *pcwsFileName, CMediaType &coMT, DWORD dwKBPerSec = INFINITE); + void Close(void); + + HRESULT SetPointer(LONGLONG llPos); + HRESULT Read(PBYTE pucBuffer, + DWORD dwBytesToRead, + BOOL bAlign, + LPDWORD pdwBytesRead); + + LONGLONG Size(LONGLONG *pSizeAvailable); + + DWORD Alignment(void); + + void Lock (void); + void Unlock(void); + + bool DecodeFrame(void); + + // + + bool OpenFile(const WORD *pcwsFileName); + + DWORD ReadFile(PVOID pBuf , DWORD dwLen ); + long SeekFile(long nOffset, int iOrigin); + + // + + private: + + CCritSec m_csLock; + + DWORD m_dwKBPerSec; + DWORD m_dwTimeStart; + + mpg123_handle *m_pcoMH; + + DWORD m_dwTotalBlocks; + DWORD m_dwAlignment; + + DWORD m_dwLength; + DWORD m_dwPosition; + + BYTE m_ucHeader[WAVE_HEADER_LENGTH]; + + // + + DWORD m_dwDataBufPos; + DWORD m_dwDataBufLen; + BYTE m_ucDataBuffer[MP3_DECODE_BUF_LEN]; + + // + + bool m_bSeekFlag; + + // + + IIEP::CFileIn m_coFileIn; + long m_nDataBegin; + long m_nDataTotal; + }; + + // ---------------------------------------------------------------------------------------------- + + class CMP3Reader : public CAsyncReader + { + public: + + // We're not going to be CoCreate'd so we don't need registration stuff etc + + STDMETHODIMP Register(void) + { + return S_OK; + } + + STDMETHODIMP Unregister(void) + { + return S_OK; + } + + CMP3Reader(CMP3Stream *pcoStream, + CMediaType *pcoMT, + HRESULT *phr) : + CAsyncReader(NAME("MP3 Reader\0"), + NULL, + pcoStream, + phr) + { + m_coMT = *pcoMT; + } + }; +} + +// ------------------------------------------------------------------------------------------------ \ No newline at end of file diff --git a/deps/mpg123/ports/MSVC++/CMP3Stream/INCLUDE/IIEP_Def.H b/deps/mpg123/ports/MSVC++/CMP3Stream/INCLUDE/IIEP_Def.H new file mode 100644 index 0000000..07a853d --- /dev/null +++ b/deps/mpg123/ports/MSVC++/CMP3Stream/INCLUDE/IIEP_Def.H @@ -0,0 +1,206 @@ +// +// __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ +// /_//_//_//_/\ /_//_//_//_/\ /_//_//_//_/\ /_//_//_//_/\ +// \_/_//_/\\_\/ \_/_//_/\\_\//_/\\_\\_\\_\//_/\\_\\_/_/\/ +// /_//_/\/ /_//_/\/ /_/\/ __ /_/\/ __ /_/\/ +// /_//_/\/ /_//_/\/ /_//_//_/\ /_//_//_//_/\/ +// /_//_/\/ /_//_/\/ /_/\\_\\_\/ /_/\\_\\_\\_\/ +// __ /_//_/\/ __ /_//_/\/ /_/\/ __ __ /_/\/ +// /_//_//_//_/\ /_//_//_//_/\ /_//_//_//_/\ /_/\/ +// \_\\_\\_\\_\/ \_\\_\\_\\_\/ \_\\_\\_\\_\/ \_\/ +// +// +// ..:: Interactive Internet Entertainment Platform ::.. +// +// (C) 2000-2006, FAN YI PENG. ALL RIGHTS RESERVED +// +// ________________________________________________________________________________________________ +// +/// @file IIEP_Def.H +/// @brief »ů±ľ¶¨Ňĺ +// ________________________________________________________________________________________________ +// +// +// _____________________________________ +// | | +// | DATA | +// _____________________________|_____________________________________|____________________________ +// +// __________ +// __________________________________________| CONFIG |__________________________________________ + +#pragma once + +#ifdef _DEBUG + #pragma comment(lib, "IIEP_DBG.LIB") +#else + #pragma comment(lib, "IIEP.LIB") +#endif + +// ____________________________________________ CONFIG ____________________________________________ +// +// __________ +// __________________________________________| DEFINE |__________________________________________ +// +// _____________ +// ____/ Data Type \_____________________________________________________________________________ + +typedef unsigned char BYTE; +typedef unsigned short WORD; +typedef unsigned long DWORD; +typedef __int64 QWORD; + +typedef BYTE *PBYTE; +typedef WORD *PWORD; +typedef DWORD *PDWORD; +typedef QWORD *PQWORD; + +typedef void *PVOID; + +// ______ Data Type _______________________________________________________________________________ +// +// ___________ +// ____/ Release \_______________________________________________________________________________ + +#define SAFE_DELETE(p) if (p) { delete (p); (p) = 0; } +#define SAFE_DELETE_ARRAY(p) if (p) { delete[] (p); (p) = 0; } +#define SAFE_RELEASE(p) if (p) { (p) -> Release(); (p) = 0; } + +// ______ Release _________________________________________________________________________________ +// +// __________ +// ____/ Assert \________________________________________________________________________________ + +#ifndef ASSERT + #ifdef _DEBUG + namespace IIEP { bool AssertFunction(bool, long, const char *, const char *); } + #define ASSERT(expression) \ + if (IIEP::AssertFunction((bool) (expression), __LINE__, __FILE__, __FUNCTION__)) {_asm {int 3}} + #else + #define ASSERT(expression) + #endif +#endif + +// ______ Assert __________________________________________________________________________________ +// +// _______ +// ____/ LOG \___________________________________________________________________________________ + +namespace IIEP +{ + void DebugLog(const char *pcszFormat, ...); + void DebugLog(const WORD *pcwsFormat, ...); + + void WriteLog(const char *pcszFormat, ...); + void WriteLog(const WORD *pcwsFormat, ...); +} + +// ______ LOG _____________________________________________________________________________________ +// +// ________ +// ____/ TODO \__________________________________________________________________________________ + +#ifdef _DEBUG + #define TODO \ + IIEP::DebugLog("\n[TODO] %d: \"%s\"- %s()\n~~~~~~\n", __LINE__, __FILE__, __FUNCTION__); + #define ToDo(x) \ + IIEP::DebugLog("\n[TODO] %d: \"%s\"- %s(): %s\n~~~~~~\n", __LINE__, __FILE__, __FUNCTION__, (x)); +#else + #define TODO + #define ToDo(x) +#endif + +// ______ TODO ____________________________________________________________________________________ +// +// ________ +// ____/ Path \__________________________________________________________________________________ + +namespace IIEP +{ + void ResetToExePath(void); +} + +// ______ Path ____________________________________________________________________________________ +// +// __________ +// ____/ CMutex \________________________________________________________________________________ + +namespace IIEP +{ + class CMutex + { + public: + + CMutex(void) { m_bLocked = false; } + ~CMutex(void) {} + + void Lock(void); + void Unlock(void) { m_bLocked = false; } + void Set(void) { m_bLocked = true; } + void Wait(void); + + bool IsLock(void) const { return m_bLocked; } + + private: + + volatile bool m_bLocked; + }; +} + +// ______ CMutex __________________________________________________________________________________ +// +// _________ +// ____/ SRect \_________________________________________________________________________________ + +namespace IIEP +{ + /// @brief ľŘĐνṹ + + struct SRect + { + SRect(void) {} + + SRect(long nX, long nY, long nWidth, long nHeight) + { + m_nX = nX; + m_nY = nY; + m_nWidth = nWidth; + m_nHeight = nHeight; + } + + // ------------------------------------------------------------------------------------------- + + void Set(long nX, long nY, long nWidth, long nHeight) + { + m_nX = nX; + m_nY = nY; + m_nWidth = nWidth; + m_nHeight = nHeight; + } + + // ------------------------------------------------------------------------------------------- + + long m_nX; ///< ľŘĐÎ×óÉĎ˝Ç X Öá×ř±ę + long m_nY; ///< ľŘĐÎ×óÉĎ˝Ç Y Öá×ř±ę + long m_nWidth; ///< ľŘĐÎżí¶Č + long m_nHeight; ///< ľŘĐÎ¸ß¶Č + }; +} + +// ______ SRect ___________________________________________________________________________________ +// +// ___________________________ +// ____/ Sample Grabber CallBack \_______________________________________________________________ + +namespace IIEP +{ + typedef void (*CALLBACK_SampleGrabberBuffer) (PVOID, DWORD); +} + +// ______ Sample Grabber CallBack _________________________________________________________________ +// +// ____________________________________________ DEFINE ____________________________________________ +// +// ____________________________________________________________________________________ DATA ______ +// +// ___________________________________________ FILE END ___________________________________________ \ No newline at end of file diff --git a/deps/mpg123/ports/MSVC++/CMP3Stream/INCLUDE/IIEP_FileIn.H b/deps/mpg123/ports/MSVC++/CMP3Stream/INCLUDE/IIEP_FileIn.H new file mode 100644 index 0000000..73fb5b4 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/CMP3Stream/INCLUDE/IIEP_FileIn.H @@ -0,0 +1,167 @@ +// +// __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ +// /_//_//_//_/\ /_//_//_//_/\ /_//_//_//_/\ /_//_//_//_/\ +// \_/_//_/\\_\/ \_/_//_/\\_\//_/\\_\\_\\_\//_/\\_\\_/_/\/ +// /_//_/\/ /_//_/\/ /_/\/ __ /_/\/ __ /_/\/ +// /_//_/\/ /_//_/\/ /_//_//_/\ /_//_//_//_/\/ +// /_//_/\/ /_//_/\/ /_/\\_\\_\/ /_/\\_\\_\\_\/ +// __ /_//_/\/ __ /_//_/\/ /_/\/ __ __ /_/\/ +// /_//_//_//_/\ /_//_//_//_/\ /_//_//_//_/\ /_/\/ +// \_\\_\\_\\_\/ \_\\_\\_\\_\/ \_\\_\\_\\_\/ \_\/ +// +// +// ..:: Interactive Internet Entertainment Platform ::.. +// +// (C) 2000-2005, FAN YI PENG. ALL RIGHTS RESERVED +// +// ________________________________________________________________________________________________ +// +/// @file IIEP_FileIn.H +/// @brief ÎÄĽţĘäČë˝ÓżÚŔŕ +// ________________________________________________________________________________________________ +// +// +// _____________________________________ +// | | +// | DATA | +// _____________________________|_____________________________________|____________________________ +// +// __________ +// __________________________________________| CONFIG |__________________________________________ + +#pragma once + +// ____________________________________________ CONFIG ____________________________________________ +// +// __________ +// __________________________________________| HEADER |__________________________________________ + +#include +#include + +#include + +// ____________________________________________ HEADER ____________________________________________ +// +// __________ +// __________________________________________| DEFINE |__________________________________________ +// +// ___________ +// ____/ CFileIn \_______________________________________________________________________________ + +namespace IIEP +{ + /// @brief ÎÄĽţĘäČë˝ÓżÚŔŕ + + class CFileIn + { + public: + + CFileIn(void); + ~CFileIn(void); + + bool Open(const char *pcszFileName); + bool Open(const WORD *pcwsFileName); + + void Close(void); + + DWORD GetFileSize(void) const; + DWORD GetReadPosition(void) const; + + bool Seek(long nOffset, long nOrigin = 0); // SEEK_SET = 0 SEEK_CUR = 1 SEEK_END = 2 + + bool Skip(long nOffset) { return Seek(nOffset, 1); } + + DWORD Read(PVOID pDataBuffer, DWORD dwReadSize); + + bool ReadB(BYTE &ucData) + { + return (1 == Read(&ucData, 1)); + } + + bool ReadW(WORD &wData) + { + return (2 == Read(&wData, 2)); + } + + bool ReadDW(DWORD &dwData) + { + return (4 == Read(&dwData, 4)); + } + + bool ReadInverseW(WORD &wData) + { + if (2 == Read(&wData, 2)) + { + _asm + { + MOV ECX, wData + MOV AX, [ECX] + XCHG AH, AL + MOV [ECX], AX + } + + return true; + } + + return false; + } + + bool ReadInverseDW(DWORD &dwData) + { + if (4 == Read(&dwData, 4)) + { + _asm + { + MOV ECX, dwData + MOV EAX, [ECX] + BSWAP EAX + MOV [ECX], EAX + } + + return true; + } + + return false; + } + + // -------------------------------------------------------------------------------------------- + + bool ReadAnsiLine(std::string &strLine); + bool ReadUnicodeLine(std::wstring &wstrLine, bool bBigEndian); + + bool ReadAnsiString (char *pszBuffer, DWORD dwBufferLength); + bool ReadUnicodeString(WORD *pwzBuffer, DWORD dwBufferLength); + + // -------------------------------------------------------------------------------------------- + + private: + + CFileIn(const CFileIn &); // forbidden + CFileIn & operator = (const CFileIn &); // forbidden + + #include + }; +} + +// ______ CFileIn _________________________________________________________________________________ +// +// _______________ +// ____/ Memory File \___________________________________________________________________________ + +namespace IIEP +{ + bool CreateMemoryFile(PVOID pMemory, DWORD dwLength, const char *pcszFileName); + bool CreateMemoryFile(PVOID pMemory, DWORD dwLength, const WORD *pcwsFileName); + bool RemoveMemoryFile(const char *pcszFileName); + bool RemoveMemoryFile(const WORD *pcwsFileName); + void RemoveMemoryFile(void); +} + +// ______ Memory File _____________________________________________________________________________ +// +// ____________________________________________ DEFINE ____________________________________________ +// +// ____________________________________________________________________________________ DATA ______ +// +// ___________________________________________ FILE END ___________________________________________ \ No newline at end of file diff --git a/deps/mpg123/ports/MSVC++/CMP3Stream/README b/deps/mpg123/ports/MSVC++/CMP3Stream/README new file mode 100644 index 0000000..df7a9aa --- /dev/null +++ b/deps/mpg123/ports/MSVC++/CMP3Stream/README @@ -0,0 +1,4 @@ +This is a MS Visual C++ project plus wrapper class for libmpg123, contributed by "Gates Fan" . +You need to copy the stuff from mgp123-x.y.z/src/libmpg123 to the libMPG123 directory and also ensure that you produce a valid mpg123.h from the mpg123.h.in (replace the @BLABLA@ with the appropriate #includes). + +Thomas. diff --git a/deps/mpg123/ports/MSVC++/CMP3Stream/SOURCE/CORE_FileIn.CPP b/deps/mpg123/ports/MSVC++/CMP3Stream/SOURCE/CORE_FileIn.CPP new file mode 100644 index 0000000..4fb1a02 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/CMP3Stream/SOURCE/CORE_FileIn.CPP @@ -0,0 +1,462 @@ +// ------------------------------------------------------------------------------------------------ + +#include + +#include +#include + +#include +#include +#include + +// ------------------------------------------------------------------------------------------------ + +struct MEM_FILE_IDX +{ + MEM_FILE_IDX(void) + { + m_dwID = 0; + m_dwLength = 0; + m_pucData = 0; + } + + DWORD m_dwID; // hash ID of filename + DWORD m_dwLength; // file length + PBYTE m_pucData; // memory pointer +}; + +static std::vector s_vecMemFile; + +// ------------------------------------------------------------------------------------------------ +// name: SearchMemFile() +// desc: +// ------------------------------------------------------------------------------------------------ + +static std::vector :: iterator SearchMemFile(PCWSTR pcwsFileName) +{ + DWORD dwID = IIEP::HashFNV_1a(pcwsFileName); + + std::vector ::iterator it; + + for (it = s_vecMemFile.begin(); it < s_vecMemFile.end(); it ++) + { + if (it -> m_dwID == dwID) return it; + } + + return s_vecMemFile.end(); +} + +// ------------------------------------------------------------------------------------------------ + +static std::vector :: iterator SearchMemFile(const char *pcszFileName) +{ + WORD wzNameBuffer[0x1000]; + + wzNameBuffer[0] = 0; + + IIEP::StringFromANSI(pcszFileName, wzNameBuffer, 0x1000); + + return SearchMemFile(wzNameBuffer); +} + +// ------------------------------------------------------------------------------------------------ +// name: CreateMemoryFile() +// desc: +// ------------------------------------------------------------------------------------------------ + +bool IIEP::CreateMemoryFile(PVOID pMemory, DWORD dwLength, PCWSTR pcwsFileName) +{ + if (0 == pcwsFileName || 0 == *pcwsFileName) return false; + + RemoveMemoryFile(pcwsFileName); + + DWORD dwID = IIEP::HashFNV_1a(pcwsFileName); + + MEM_FILE_IDX soIDX; + + soIDX.m_dwID = dwID; + soIDX.m_dwLength = dwLength; + soIDX.m_pucData = (PBYTE) pMemory; + + s_vecMemFile.push_back(soIDX); + + return true; +} + +// ------------------------------------------------------------------------------------------------ + +bool IIEP::CreateMemoryFile(PVOID pMemory, DWORD dwLength, const char *pcszFileName) +{ + WORD wzNameBuffer[0x1000]; + + wzNameBuffer[0] = 0; + + StringFromANSI(pcszFileName, wzNameBuffer, 0x1000); + + return CreateMemoryFile(pMemory, dwLength, wzNameBuffer); +} + +// ------------------------------------------------------------------------------------------------ +// name: RemoveMemoryFile() +// desc: +// ------------------------------------------------------------------------------------------------ + +bool IIEP::RemoveMemoryFile(PCWSTR pcwsFileName) +{ + if (0 == pcwsFileName || 0 == *pcwsFileName) return false; + + std::vector ::iterator it = SearchMemFile(pcwsFileName); + + if (it == s_vecMemFile.end()) return false; + + s_vecMemFile.erase(it); + + return true; +} + +// ------------------------------------------------------------------------------------------------ + +bool IIEP::RemoveMemoryFile(const char *pcszFileName) +{ + WORD wzNameBuffer[0x1000]; + + wzNameBuffer[0] = 0; + + StringFromANSI(pcszFileName, wzNameBuffer, 0x1000); + + return RemoveMemoryFile(wzNameBuffer); +} + +// ------------------------------------------------------------------------------------------------ + +void IIEP::RemoveMemoryFile(void) +{ + s_vecMemFile.clear(); +} + +// ------------------------------------------------------------------------------------------------ +// name: CFileIn() +// desc: +// ------------------------------------------------------------------------------------------------ + +IIEP::CFileIn::CFileIn(void) +{ + m_pFile = 0; + m_pucMemData = 0; + m_dwLength = 0; + m_dwReadPos = 0; +} + +// ------------------------------------------------------------------------------------------------ +// name: ~CFileIn() +// desc: +// ------------------------------------------------------------------------------------------------ + +IIEP::CFileIn::~CFileIn(void) +{ + Close(); +} + +// ------------------------------------------------------------------------------------------------ +// name: Open() +// desc: +// ------------------------------------------------------------------------------------------------ + +bool IIEP::CFileIn::Open(const char *pcszFileName) +{ + WORD wzNameBuffer[0x1000]; + + wzNameBuffer[0] = 0; + + StringFromANSI(pcszFileName, wzNameBuffer, 0x1000); + + return Open(wzNameBuffer); +} + +// ------------------------------------------------------------------------------------------------ + +bool IIEP::CFileIn::Open(const WORD *pcwsFileName) +{ + Close(); + + if (0 == pcwsFileName || 0 == *pcwsFileName) return false; + + std::vector ::iterator it = SearchMemFile(pcwsFileName); + + if (it == s_vecMemFile.end()) // not found in memory + { + m_pFile = _wfopen(pcwsFileName, L"rb"); + + if (m_pFile) + { + return true; // found DOS file + } + + return false; + } + + if (s_vecMemFile.empty()) return false; + + m_pucMemData = it -> m_pucData; + m_dwLength = it -> m_dwLength; + + return true; +} + +// ------------------------------------------------------------------------------------------------ +// name: Close() +// desc: +// ------------------------------------------------------------------------------------------------ + +void IIEP::CFileIn::Close(void) +{ + if (m_pFile) + { + fclose(m_pFile); + + m_pFile = 0; + } + + m_pucMemData = 0; + m_dwLength = 0; + m_dwReadPos = 0; +} + +// ------------------------------------------------------------------------------------------------ +// name: GetFileSize() +// desc: +// ------------------------------------------------------------------------------------------------ + +DWORD IIEP::CFileIn::GetFileSize(void) const +{ + if (m_pFile) + { + DWORD dwPostion = ftell(m_pFile); + + fseek(m_pFile, 0, SEEK_END); + + DWORD dwFileSize = ftell(m_pFile); + + fseek(m_pFile, dwPostion, SEEK_SET); + + return dwFileSize; + } + + return m_dwLength; +} + +// ------------------------------------------------------------------------------------------------ +// name: GetReadPosition() +// desc: +// ------------------------------------------------------------------------------------------------ + +DWORD IIEP::CFileIn::GetReadPosition(void) const +{ + if (m_pFile) + { + return ftell(m_pFile); + } + + return m_dwReadPos; +} + +// ------------------------------------------------------------------------------------------------ +// name: Seek() +// desc: +// ------------------------------------------------------------------------------------------------ + +bool IIEP::CFileIn::Seek(long nOffset, long nOrigin) +{ + if (m_pFile) + { + return (0 == fseek(m_pFile, nOffset, nOrigin)); + } + + if (m_pucMemData) + { + switch (nOrigin) + { + case SEEK_SET: + if (nOffset < 0 || nOffset >= (long) m_dwLength) return false; + m_dwReadPos = nOffset; + return true; + + case SEEK_CUR: + nOffset += m_dwReadPos; + if (nOffset < 0 || nOffset >= (long) m_dwLength) return false; + m_dwReadPos = nOffset; + return true; + + case SEEK_END: + ASSERT(nOffset <= 0); // Őâ¸ö±ŘĐëĘǸşĘý + nOffset = m_dwLength - 1 + nOffset; + if (nOffset < 0 || nOffset >= (long) m_dwLength) return false; + m_dwReadPos = nOffset; + return true; + } + } + + return false; +} + +// ------------------------------------------------------------------------------------------------ +// name: Read() +// desc: +// ------------------------------------------------------------------------------------------------ + +DWORD IIEP::CFileIn::Read(PVOID pDataBuffer, DWORD dwReadSize) +{ + if (m_pFile) + { + return (DWORD) fread(pDataBuffer, 1, dwReadSize, m_pFile); + } + + if (m_pucMemData) + { + if (m_dwReadPos + dwReadSize > m_dwLength) dwReadSize = m_dwLength - m_dwReadPos; + + memcpy(pDataBuffer, m_pucMemData + m_dwReadPos, dwReadSize); + + m_dwReadPos += dwReadSize; + + return dwReadSize; + } + + return 0; +} + +// ------------------------------------------------------------------------------------------------ +// name: ReadAnsiLine() +// desc: +// ------------------------------------------------------------------------------------------------ + +bool IIEP::CFileIn::ReadAnsiLine(std::string &strLine) +{ + BYTE ucChar = 0; + + strLine.clear(); + + while (ReadB(ucChar)) + { + if (0x0D == ucChar) + { + } + else + if (0x0A == ucChar) + { + return true; + } + else + { + strLine.push_back(ucChar); + } + } + + if (strLine.empty()) return false; + + return true; +} + +// ------------------------------------------------------------------------------------------------ +// name: ReadUnicodeLine() +// desc: +// ------------------------------------------------------------------------------------------------ + +bool IIEP::CFileIn::ReadUnicodeLine(std::wstring &wstrLine, bool bBigEndian) +{ + WORD wChar = 0; + + wstrLine.clear(); + + while (bBigEndian ? ReadInverseW(wChar) : ReadW(wChar)) + { + if (0x000D == wChar) + { + } + else + if (0x000A == wChar) + { + return true; + } + else + { + wstrLine.push_back(wChar); + } + } + + if (wstrLine.empty()) return false; + + return true; +} + +// ------------------------------------------------------------------------------------------------ +// name: ReadAnsiString() +// desc: +// ------------------------------------------------------------------------------------------------ + +bool IIEP::CFileIn::ReadAnsiString(char *pszBuffer, DWORD dwBufferLength) +{ + DWORD dwIndex = 0; + BYTE ucChar; + + while (ReadB(ucChar)) + { + if (dwIndex >= dwBufferLength) return true; + + pszBuffer[dwIndex ++] = ucChar; + + if (0 == ucChar) + { + return true; + } + } + + return false; +} + +// ------------------------------------------------------------------------------------------------ +// name: ReadUnicodeString() +// desc: +// ------------------------------------------------------------------------------------------------ + +bool IIEP::CFileIn::ReadUnicodeString(WORD *pwzBuffer, DWORD dwBufferLength) +{ + DWORD dwIndex = 0; + WORD wChar; + + ReadInverseW(wChar); + + if (wChar == 0xFFFE) // Unicode + { + while (ReadW(wChar)) + { + if (dwIndex >= dwBufferLength) return true; + + pwzBuffer[dwIndex ++] = wChar; + + if (0 == wChar) + { + return true; + } + } + } + else + if (wChar == 0xFEFF) // Unicode big endian + { + while (ReadInverseW(wChar)) + { + if (dwIndex >= dwBufferLength) return true; + + pwzBuffer[dwIndex ++] = wChar; + + if (0 == wChar) + { + return true; + } + } + } + + return false; +} + +// ------------------------------------------------------------------------------------------------ \ No newline at end of file diff --git a/deps/mpg123/ports/MSVC++/CMP3Stream/SOURCE/CORE_Log.CPP b/deps/mpg123/ports/MSVC++/CMP3Stream/SOURCE/CORE_Log.CPP new file mode 100644 index 0000000..ab67713 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/CMP3Stream/SOURCE/CORE_Log.CPP @@ -0,0 +1,122 @@ +// ------------------------------------------------------------------------------------------------ + +#include +#include + +#include + +#include + +// ------------------------------------------------------------------------------------------------ + +static bool s_bLogFileOpened = false; + +// ------------------------------------------------------------------------------------------------ +// name: DebugLog() +// desc: +// ------------------------------------------------------------------------------------------------ + +void IIEP::DebugLog(const char *pcszFormat, ...) +{ +#ifdef _DEBUG + char cBuffer[0x8000]; + + va_list pcArg; + + va_start(pcArg, pcszFormat); + _vsnprintf(cBuffer, 0x8000, pcszFormat, pcArg); + va_end(pcArg); + + ::OutputDebugStringA(cBuffer); +#endif +} + +// ------------------------------------------------------------------------------------------------ + +void IIEP::DebugLog(const WORD *pcwsFormat, ...) +{ +#ifdef _DEBUG + WCHAR wcBuffer[0x8000]; + + va_list pcArg; + + va_start(pcArg, pcwsFormat); + _vsnwprintf(wcBuffer, 0x8000, pcwsFormat, pcArg); + va_end(pcArg); + + ::OutputDebugStringW(wcBuffer); +#endif +} + +// ------------------------------------------------------------------------------------------------ +// name: WriteLog() +// desc: +// ------------------------------------------------------------------------------------------------ + +void IIEP::WriteLog(const char *pcszFormat, ...) +{ + char cBuffer[0x8000]; + + va_list pcArg; + + va_start(pcArg, pcszFormat); + _vsnprintf(cBuffer, 0x8000, pcszFormat, pcArg); + va_end(pcArg); + + FILE *phFile; + + #define LOG_FILE "C:\\IIEP.LOG" + + if (s_bLogFileOpened) + { + phFile = fopen(LOG_FILE, "a+"); + } + else + { + phFile = fopen(LOG_FILE, "w"); + + s_bLogFileOpened = true; + } + + if (phFile) + { + fprintf(phFile, cBuffer); + fclose(phFile); + } +} + +// ------------------------------------------------------------------------------------------------ + +void IIEP::WriteLog(const WORD *pcwsFormat, ...) +{ + WCHAR wcBuffer[0x8000]; + + va_list pcArg; + + va_start(pcArg, pcwsFormat); + _vsnwprintf(wcBuffer, 0x8000, pcwsFormat, pcArg); + va_end(pcArg); + + FILE *phFile; + + #define LOG_FILE "C:\\IIEP.LOG" + + if (s_bLogFileOpened) + { + phFile = fopen(LOG_FILE, "a"); + } + else + { + phFile = fopen(LOG_FILE, "w"); + + s_bLogFileOpened = true; + } + + if (phFile) + { + fwprintf(phFile, wcBuffer); + fclose(phFile); + } +} + +// ------------------------------------------------------------------------------------------------ \ No newline at end of file diff --git a/deps/mpg123/ports/MSVC++/CMP3Stream/SOURCE/CORE_Mutex.CPP b/deps/mpg123/ports/MSVC++/CMP3Stream/SOURCE/CORE_Mutex.CPP new file mode 100644 index 0000000..5566f35 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/CMP3Stream/SOURCE/CORE_Mutex.CPP @@ -0,0 +1,35 @@ +// ------------------------------------------------------------------------------------------------ + +#include + +#include + +// ------------------------------------------------------------------------------------------------ +// name: Lock() +// desc: +// ------------------------------------------------------------------------------------------------ + +void IIEP::CMutex::Lock(void) +{ + while (m_bLocked) + { + ::Sleep(1); + } + + m_bLocked = true; +} + +// ------------------------------------------------------------------------------------------------ +// name: Wait() +// desc: +// ------------------------------------------------------------------------------------------------ + +void IIEP::CMutex::Wait(void) +{ + while (m_bLocked) + { + ::Sleep(1); + } +} + +// ------------------------------------------------------------------------------------------------ \ No newline at end of file diff --git a/deps/mpg123/ports/MSVC++/CMP3Stream/SOURCE/SourceFilter_MP3Stream.CPP b/deps/mpg123/ports/MSVC++/CMP3Stream/SOURCE/SourceFilter_MP3Stream.CPP new file mode 100644 index 0000000..658b000 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/CMP3Stream/SOURCE/SourceFilter_MP3Stream.CPP @@ -0,0 +1,586 @@ +// ------------------------------------------------------------------------------------------------ + +#include + +#include + +// ------------------------------------------------------------------------------------------------ + +extern BYTE g_ucWaveHeader[WAVE_HEADER_LENGTH]; + +// ------------------------------------------------------------------------------------------------ +// name: CMP3Stream() +// desc: +// ------------------------------------------------------------------------------------------------ + +static size_t read_sub(int fd, void *pBuf, size_t nSize) +{ + if (fd) + { + IIEP::CMP3Stream *pcoStream = (IIEP::CMP3Stream *) fd; + + return pcoStream -> ReadFile(pBuf, nSize); + } + + return 0; +} + +// ------------------------------------------------------------------------------------------------ +// name: CMP3Stream() +// desc: +// ------------------------------------------------------------------------------------------------ + +static off_t seek_sub(int fd, off_t nOffset, int iOrigin) +{ + if (fd) + { + IIEP::CMP3Stream *pcoStream = (IIEP::CMP3Stream *) fd; + + return pcoStream -> SeekFile(nOffset, iOrigin); + } + + return 0; +} + +// ------------------------------------------------------------------------------------------------ +// name: CMP3Stream() +// desc: +// ------------------------------------------------------------------------------------------------ + +IIEP::CMP3Stream::CMP3Stream(void) +{ + m_dwKBPerSec = INFINITE; + m_dwTimeStart = 0; + + m_pcoMH = 0; + + m_dwTotalBlocks = 0; + m_dwAlignment = 4; + + m_dwLength = 0; + m_dwPosition = 0; + + memcpy(m_ucHeader, g_ucWaveHeader, WAVE_HEADER_LENGTH); + + m_dwDataBufPos = 0; + m_dwDataBufLen = 0; + + m_bSeekFlag = false; +} + +// ------------------------------------------------------------------------------------------------ +// name: ~CMP3Stream() +// desc: +// ------------------------------------------------------------------------------------------------ + +IIEP::CMP3Stream::~CMP3Stream(void) +{ + Close(); +} + +// ------------------------------------------------------------------------------------------------ +// name: SetSeekFlag() +// desc: called by IIEP::CPlayer::SetMediaPosition(QWORD qwPosition) +// ------------------------------------------------------------------------------------------------ + +void IIEP::CMP3Stream::SetSeekFlag(void) +{ + m_bSeekFlag = true; +} + +// ------------------------------------------------------------------------------------------------ +// name: Open() +// desc: +// ------------------------------------------------------------------------------------------------ + +bool IIEP::CMP3Stream::Open(const WORD *pcwsFileName, CMediaType &coMT, DWORD dwKBPerSec) +{ + Close(); + + // + + if (MPG123_OK != mpg123_init()) + { + goto OPEN_FAIL; + } + + m_pcoMH = mpg123_new(NULL, NULL); + + if (0 == m_pcoMH) + { + goto OPEN_FAIL; + } + + if (false == OpenFile(pcwsFileName)) + { + goto OPEN_FAIL; + } + + if (MPG123_OK != mpg123_replace_reader(m_pcoMH, read_sub, seek_sub)) + { + goto OPEN_FAIL; + } + + if (MPG123_OK != mpg123_open_fd(m_pcoMH, (int) this)) + { + goto OPEN_FAIL; + } + + long nRate; + int iChannels; + int iEncoding; + + if (MPG123_OK != mpg123_getformat(m_pcoMH, &nRate, &iChannels, &iEncoding)) + { + goto OPEN_FAIL; + } + + // Ensure that this output format will not change (it could, when we allow it) + + mpg123_format_none(m_pcoMH); + mpg123_format(m_pcoMH, nRate, iChannels, iEncoding); + + // scan & get total samples + + mpg123_scan(m_pcoMH); + + off_t nOff = mpg123_length(m_pcoMH); + + if (nOff < 0) + { + goto OPEN_FAIL; + } + + m_dwTotalBlocks = (DWORD) nOff; + + // set other format + + m_dwAlignment = iChannels * 2; + + if (0 == m_dwAlignment) + { + m_dwAlignment = 4; + } + + m_dwLength = m_dwTotalBlocks * m_dwAlignment + WAVE_HEADER_LENGTH; + + WORD wChannels = (WORD ) iChannels; + DWORD dwSamplesPerSec = (DWORD) nRate; + DWORD dwAvgBytesPerSec = m_dwAlignment * dwSamplesPerSec; + WORD wBlockAlign = (WORD ) m_dwAlignment; + WORD wBitsPerSample = 16; + + PWORD pwData; + PDWORD pdwData; + + pdwData = (PDWORD) &m_ucHeader[0x04]; + *pdwData = m_dwTotalBlocks * m_dwAlignment + WAVE_HEADER_LENGTH - 8; + + pwData = (PWORD) &m_ucHeader[0x16]; + *pwData = wChannels; + + pdwData = (PDWORD) &m_ucHeader[0x18]; + *pdwData = dwSamplesPerSec; + + pdwData = (PDWORD) &m_ucHeader[0x1C]; + *pdwData = dwAvgBytesPerSec; + + pwData = (PWORD) &m_ucHeader[0x20]; + *pwData = wBlockAlign; + + pwData = (PWORD) &m_ucHeader[0x22]; + *pwData = wBitsPerSample; + + pdwData = (PDWORD) &m_ucHeader[0x28]; + *pdwData = m_dwTotalBlocks * m_dwAlignment; + + coMT.majortype = MEDIATYPE_Stream; + coMT.subtype = MEDIASUBTYPE_WAVE; + + SetPointer(0); + + m_dwTimeStart = ::timeGetTime(); + + return true; + +OPEN_FAIL: + + Close(); + + return false; +} + +// ------------------------------------------------------------------------------------------------ +// name: Close() +// desc: +// ------------------------------------------------------------------------------------------------ + +void IIEP::CMP3Stream::Close(void) +{ + m_coFileIn.Close(); + + if (m_pcoMH) + { + mpg123_close (m_pcoMH); + mpg123_delete(m_pcoMH); + + m_pcoMH = 0; + } + + mpg123_exit(); + + m_dwTimeStart = 0; + m_dwTotalBlocks = 0; + + m_dwLength = 0; + m_dwPosition = 0; + + m_bSeekFlag = false; + + m_nDataBegin = 0; + m_nDataTotal = 0; +} + +// ------------------------------------------------------------------------------------------------ +// name: SetPointer() +// desc: +// ------------------------------------------------------------------------------------------------ + +HRESULT IIEP::CMP3Stream::SetPointer(LONGLONG llPos) +{ + if (llPos < 0 || llPos > (LONGLONG) m_dwLength) + { + return S_FALSE; + } + + m_dwPosition = (DWORD) llPos; + + if (llPos < WAVE_HEADER_LENGTH) + { + mpg123_seek(m_pcoMH, 0, SEEK_SET); + + m_dwDataBufLen = 0; + } + else + { + if (m_bSeekFlag && m_dwAlignment > 0) + { + m_bSeekFlag = false; + + mpg123_seek(m_pcoMH, (long) (m_dwPosition - WAVE_HEADER_LENGTH) / m_dwAlignment, SEEK_SET); + + m_dwDataBufLen = 0; + } + } + + return S_OK; +} + +// ------------------------------------------------------------------------------------------------ +// name: Read() +// desc: +// ------------------------------------------------------------------------------------------------ + +HRESULT IIEP::CMP3Stream::Read(PBYTE pucBuffer, + DWORD dwBytesToRead, + BOOL bAlign, + LPDWORD pdwBytesRead) +{ + if (0 == m_pcoMH) return S_FALSE; + + CAutoLock lck(&m_csLock); + + DWORD dwReadLength; + + // wait until the bytes are here + + DWORD dwTime = ::timeGetTime(); + + if (m_dwPosition + dwBytesToRead > m_dwLength) + { + dwReadLength = m_dwLength - m_dwPosition; + } + else + { + dwReadLength = dwBytesToRead; + } + + DWORD dwTimeToArrive = (m_dwPosition + dwReadLength) / m_dwKBPerSec; + + if (dwTime - m_dwTimeStart < dwTimeToArrive) + { + ::Sleep(dwTimeToArrive - dwTime + m_dwTimeStart); + } + + // read data + + DWORD dwRead = 0; + + if (m_dwPosition < WAVE_HEADER_LENGTH) + { + DWORD dwPatchLen = WAVE_HEADER_LENGTH - m_dwPosition; + + if (dwReadLength < dwPatchLen) + { + dwPatchLen = dwReadLength; + } + + memcpy(pucBuffer, m_ucHeader + m_dwPosition, dwPatchLen); + + m_dwPosition += dwPatchLen; + dwReadLength -= dwPatchLen; + + pucBuffer += dwPatchLen; + dwRead += dwPatchLen; + } + + if (dwReadLength > 0) + { + while (m_dwDataBufLen < dwReadLength) + { + if (m_dwDataBufLen > 0) + { + memcpy(pucBuffer, m_ucDataBuffer + m_dwDataBufPos, m_dwDataBufLen); + + dwRead += m_dwDataBufLen; + + dwReadLength -= m_dwDataBufLen; + + pucBuffer += m_dwDataBufLen; + m_dwDataBufPos += m_dwDataBufLen; + m_dwDataBufLen = 0; + } + + if (DecodeFrame() == false) break; + } + + if (dwReadLength > 0) + { + if (m_dwDataBufLen >= dwReadLength) + { + memcpy(pucBuffer, m_ucDataBuffer + m_dwDataBufPos, dwReadLength); + + dwRead += dwReadLength; + + m_dwDataBufPos += dwReadLength; + m_dwDataBufLen -= dwReadLength; + } + } + } + + m_dwPosition += dwRead; + *pdwBytesRead = dwRead; + + return S_OK; +} + +// ------------------------------------------------------------------------------------------------ +// name: Size() +// desc: +// ------------------------------------------------------------------------------------------------ + +LONGLONG IIEP::CMP3Stream::Size(LONGLONG *pSizeAvailable) +{ +// LONGLONG llCurrentAvailable = Int32x32To64((::timeGetTime() - m_dwTimeStart), m_dwKBPerSec); + LONGLONG llLength = (LONGLONG) m_dwTotalBlocks * m_dwAlignment + WAVE_HEADER_LENGTH; + + if (pSizeAvailable) + { +// *pSizeAvailable = min(llLength, llCurrentAvailable); + *pSizeAvailable = llLength; + } + + return llLength; +} + +// ------------------------------------------------------------------------------------------------ +// name: Alignment() +// desc: +// ------------------------------------------------------------------------------------------------ + +DWORD IIEP::CMP3Stream::Alignment(void) +{ + return m_dwAlignment; +} + +// ------------------------------------------------------------------------------------------------ +// name: Lock() +// desc: +// ------------------------------------------------------------------------------------------------ + +void IIEP::CMP3Stream::Lock(void) +{ + m_csLock.Lock(); +} + +// ------------------------------------------------------------------------------------------------ +// name: Unlock() +// desc: +// ------------------------------------------------------------------------------------------------ + +void IIEP::CMP3Stream::Unlock(void) +{ + m_csLock.Unlock(); +} + +// ------------------------------------------------------------------------------------------------ +// name: DecodeFrame() +// desc: +// ------------------------------------------------------------------------------------------------ + +bool IIEP::CMP3Stream::DecodeFrame(void) +{ + if (0 == m_dwDataBufLen) + { + m_dwDataBufPos = 0; + } + + if (m_dwDataBufPos + m_dwDataBufLen + MP3_DECODE_LEN > MP3_DECODE_BUF_LEN) + { + return true; + } + + size_t nBytesRead = 0; + + mpg123_read(m_pcoMH, m_ucDataBuffer + m_dwDataBufPos + m_dwDataBufLen, MP3_DECODE_LEN, &nBytesRead); + + m_dwDataBufLen += (DWORD) nBytesRead; + + return (m_dwDataBufLen > 0); +} + +// ------------------------------------------------------------------------------------------------ +// name: OpenFile() +// desc: +// ------------------------------------------------------------------------------------------------ + +bool IIEP::CMP3Stream::OpenFile(const WORD *pcwsFileName) +{ + if (m_coFileIn.Open(pcwsFileName)) + { + m_nDataBegin = 0; + m_nDataTotal = m_coFileIn.GetFileSize(); + + // check ID3 Tag V2.x + + BYTE ucBuffer[8]; + bool bFound; + +TRY_ID3_AGAIN: + + bFound = false; + + if (6 == m_coFileIn.Read(ucBuffer, 6)) + { + if (ucBuffer[0] == 'I' && + ucBuffer[1] == 'D' && + ucBuffer[2] == '3') + { + bFound = true; + + DWORD dwHeaderSize; + + if (m_coFileIn.ReadInverseDW(dwHeaderSize)) + { + dwHeaderSize = ((dwHeaderSize & 0x7F000000) >> 3) + + ((dwHeaderSize & 0x007F0000) >> 2) + + ((dwHeaderSize & 0x00007F00) >> 1) + + ((dwHeaderSize & 0x0000007F) ); + + dwHeaderSize += 10; + + m_nDataBegin += dwHeaderSize; + m_nDataTotal -= dwHeaderSize; + + if (ucBuffer[3] >= 0x03) // ID3 Tag version >= 2.3 + { + if (ucBuffer[5] & 0x40) // has extended header + { + if (m_coFileIn.ReadInverseDW(dwHeaderSize)) + { + dwHeaderSize = ((dwHeaderSize & 0x7F000000) >> 3) + + ((dwHeaderSize & 0x007F0000) >> 2) + + ((dwHeaderSize & 0x00007F00) >> 1) + + ((dwHeaderSize & 0x0000007F) ); + + dwHeaderSize += 4; + + m_nDataBegin += dwHeaderSize; + m_nDataTotal -= dwHeaderSize; + } + } + } + } + } + } + + SeekFile(0, SEEK_SET); + + if (bFound) + { + goto TRY_ID3_AGAIN; + } +/* + m_coFileIn.Read(ucBuffer, 2); + + if (ucBuffer[0] != 0xFF || ucBuffer[1] < 0xF0) + { + m_nDataBegin ++; + m_nDataTotal --; + + SeekFile(0, SEEK_SET); + + goto TRY_ID3_AGAIN; + } + + SeekFile(0, SEEK_SET); +*/ + return true; + } + + return false; +} + +// ------------------------------------------------------------------------------------------------ +// name: ReadFile() +// desc: +// ------------------------------------------------------------------------------------------------ + +DWORD IIEP::CMP3Stream::ReadFile(PVOID pBuf, DWORD dwLen) +{ + return m_coFileIn.Read(pBuf, dwLen); +} + +// ------------------------------------------------------------------------------------------------ +// name: SeekFile() +// desc: +// ------------------------------------------------------------------------------------------------ + +long IIEP::CMP3Stream::SeekFile(long nOffset, int iOrigin) +{ + switch (iOrigin) + { + case SEEK_SET: + if (nOffset < 0 || nOffset >= m_nDataTotal) return -1; + break; + + case SEEK_CUR: + nOffset += (m_coFileIn.GetReadPosition() - m_nDataBegin); + if (nOffset < 0 || nOffset >= m_nDataTotal) return -1; + break; + + case SEEK_END: + nOffset = m_nDataTotal - 1 + nOffset; + if (nOffset < 0 || nOffset >= m_nDataTotal) return -1; + break; + } + + if (m_coFileIn.Seek(nOffset + m_nDataBegin, SEEK_SET)) + { + return nOffset; + } + + return -1; +} + +// ------------------------------------------------------------------------------------------------ \ No newline at end of file diff --git a/deps/mpg123/ports/MSVC++/CMP3Stream/libMPG123/PLACE_LIBMPG123_SOURCES_HERE b/deps/mpg123/ports/MSVC++/CMP3Stream/libMPG123/PLACE_LIBMPG123_SOURCES_HERE new file mode 100644 index 0000000..e69de29 diff --git a/deps/mpg123/ports/MSVC++/CMP3Stream/libMPG123/libMPG123.vcproj b/deps/mpg123/ports/MSVC++/CMP3Stream/libMPG123/libMPG123.vcproj new file mode 100644 index 0000000..6c68b6e --- /dev/null +++ b/deps/mpg123/ports/MSVC++/CMP3Stream/libMPG123/libMPG123.vcproj @@ -0,0 +1,245 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deps/mpg123/ports/MSVC++/config.h b/deps/mpg123/ports/MSVC++/config.h new file mode 100644 index 0000000..4658c7d --- /dev/null +++ b/deps/mpg123/ports/MSVC++/config.h @@ -0,0 +1,35 @@ +#define strcasecmp _strcmpi +#define strncasecmp _strnicmp +#define strdup _strdup + +#define HAVE_STRERROR 1 +#define HAVE_SYS_TYPES_H 1 + +#define HAVE_STRDUP +#define HAVE_STDLIB_H +#define HAVE_STRING_H + +/* We want some frame index, eh? */ +#define FRAME_INDEX 1 +#define INDEX_SIZE 1000 + +/* also gapless playback! */ +#define GAPLESS 1 +/* #ifdef GAPLESS +#undef GAPLESS +#endif */ + +/* #define DEBUG +#define EXTRA_DEBUG */ + +#define REAL_IS_FLOAT + +#define inline __inline + +/* we are on win32 */ +#define HAVE_WINDOWS_H + +/* use the unicode support within libmpg123 */ +#ifdef UNICODE + #define WANT_WIN32_UNICODE +#endif diff --git a/deps/mpg123/ports/MSVC++/examples/feedseek.c b/deps/mpg123/ports/MSVC++/examples/feedseek.c new file mode 100644 index 0000000..d62337e --- /dev/null +++ b/deps/mpg123/ports/MSVC++/examples/feedseek.c @@ -0,0 +1,240 @@ +/* + feedseek: test program for libmpg123, showing how to use fuzzy seeking in feeder mode + copyright 2008 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org +*/ + +#include +#include +#include +#include + +#define INBUFF 16384 * 2 * 2 +#define WAVE_FORMAT_PCM 0x0001 +#define WAVE_FORMAT_IEEE_FLOAT 0x0003 + +FILE *out; +size_t totaloffset, dataoffset; +long rate; +int channels, enc; +unsigned short bitspersample, wavformat; + +// write wav header +void initwav() +{ + unsigned int tmp32 = 0; + unsigned short tmp16 = 0; + + fwrite("RIFF", 1, 4, out); + totaloffset = ftell(out); + + fwrite(&tmp32, 1, 4, out); // total size + fwrite("WAVE", 1, 4, out); + fwrite("fmt ", 1, 4, out); + tmp32 = 16; + fwrite(&tmp32, 1, 4, out); // format length + tmp16 = wavformat; + fwrite(&tmp16, 1, 2, out); // format + tmp16 = channels; + fwrite(&tmp16, 1, 2, out); // channels + tmp32 = rate; + fwrite(&tmp32, 1, 4, out); // sample rate + tmp32 = rate * bitspersample/8 * channels; + fwrite(&tmp32, 1, 4, out); // bytes / second + tmp16 = bitspersample/8 * channels; // float 16 or signed int 16 + fwrite(&tmp16, 1, 2, out); // block align + tmp16 = bitspersample; + fwrite(&tmp16, 1, 2, out); // bits per sample + fwrite("data ", 1, 4, out); + tmp32 = 0; + dataoffset = ftell(out); + fwrite(&tmp32, 1, 4, out); // data length +} + +// rewrite wav header with final length infos +void closewav() +{ + unsigned int tmp32 = 0; + unsigned short tmp16 = 0; + + long total = ftell(out); + fseek(out, totaloffset, SEEK_SET); + tmp32 = total - (totaloffset + 4); + fwrite(&tmp32, 1, 4, out); + fseek(out, dataoffset, SEEK_SET); + tmp32 = total - (dataoffset + 4); + + fwrite(&tmp32, 1, 4, out); +} + +// determine correct wav format and bits per sample +// from mpg123 enc value +void initwavformat() +{ + if(enc & MPG123_ENC_FLOAT_64) + { + bitspersample = 64; + wavformat = WAVE_FORMAT_IEEE_FLOAT; + } + else if(enc & MPG123_ENC_FLOAT_32) + { + bitspersample = 32; + wavformat = WAVE_FORMAT_IEEE_FLOAT; + } + else if(enc & MPG123_ENC_16) + { + bitspersample = 16; + wavformat = WAVE_FORMAT_PCM; + } + else + { + bitspersample = 8; + wavformat = WAVE_FORMAT_PCM; + } +} + +int _tmain(int argc, TCHAR **argv) +{ + unsigned char buf[INBUFF]; + unsigned char *audio; + FILE *in; + mpg123_handle *m; + int ret, state; + size_t inc, outc; + off_t len, num; + size_t bytes; + off_t inoffset; + size_t nrates; + const long *rates; + size_t i; + inc = outc = 0; + nrates = 0; + rates = NULL; + + if(argc < 3) + { + fprintf(stderr,"Please supply in and out filenames\n"); + return -1; + } + + mpg123_init(); + + m = mpg123_new(NULL, &ret); + if(m == NULL) + { + fprintf(stderr,"Unable to create mpg123 handle: %s\n", mpg123_plain_strerror(ret)); + return -1; + } + + mpg123_param(m, MPG123_VERBOSE, 4, 0); + + ret = mpg123_param(m, MPG123_FLAGS, MPG123_FUZZY | MPG123_SEEKBUFFER | MPG123_GAPLESS, 0); + if(ret != MPG123_OK) + { + fprintf(stderr,"Unable to set library options: %s\n", mpg123_plain_strerror(ret)); + return -1; + } + + // Let the seek index auto-grow and contain an entry for every frame + ret = mpg123_param(m, MPG123_INDEX_SIZE, -1, 0); + if(ret != MPG123_OK) + { + fprintf(stderr,"Unable to set index size: %s\n", mpg123_plain_strerror(ret)); + return -1; + } + + // Use float output formats only + ret = mpg123_format_none(m); + if(ret != MPG123_OK) + { + fprintf(stderr,"Unable to disable all output formats: %s\n", mpg123_plain_strerror(ret)); + return -1; + } + + mpg123_rates(&rates, &nrates); + for(i=0; i +#include + +int _tmain(int argc, _TCHAR* argv[]) +{ + mpg123_handle *m; + int i; + if(argc < 2) + { + fprintf(stderr, "\nI will give you the estimated and exact sample lengths of MPEG audio files.\n"); + fprintf(stderr, "\nUsage: %s \n\n", argv[0]); + return -1; + } + mpg123_init(); + m = mpg123_new(NULL, NULL); + mpg123_param(m, MPG123_RESYNC_LIMIT, -1, 0); /* New in library version 0.0.1 . */ + for(i = 1; i < argc; ++i) + { + off_t a, b; + + mpg123_topen(m, argv[i]); + + a = mpg123_length(m); + mpg123_scan(m); + b = mpg123_length(m); + + mpg123_tclose(m); + + printf("File %i: estimated %li vs. scanned %li\n", i, (long)a, (long)b); + } + + mpg123_delete(m); + mpg123_exit(); + return 0; +} diff --git a/deps/mpg123/ports/MSVC++/mpg123.h b/deps/mpg123/ports/MSVC++/mpg123.h new file mode 100644 index 0000000..6b8ead3 --- /dev/null +++ b/deps/mpg123/ports/MSVC++/mpg123.h @@ -0,0 +1,46 @@ +/* + mpg123_msvc: MPEG Audio Decoder library wrapper header for MS VC++ 2005 + + copyright 2008 by the mpg123 project - free software under the terms of the LGPL 2.1 + initially written by Patrick Dehne and Thomas Orgis. +*/ +#ifndef MPG123_MSVC_H +#define MPG123_MSVC_H + +#include +#include +#include + +typedef long ssize_t; + +// Needed for Visual Studio versions before VS 2010. +#if (_MSC_VER < 1600) +typedef __int32 int32_t; +typedef unsigned __int32 uint32_t; +#else +#include +#endif + +#define PRIiMAX "I64i" +typedef __int64 intmax_t; +// ftell returns long, _ftelli64 returns __int64 +// off_t is long, not __int64, use ftell +#define ftello ftell + +#define MPG123_NO_CONFIGURE +#include "mpg123.h.in" /* Yes, .h.in; we include the configure template! */ + +#ifdef __cplusplus +extern "C" { +#endif + + // Wrapper around mpg123_open that supports path names with unicode + // characters + EXPORT int mpg123_topen(mpg123_handle *fr, const _TCHAR *path); + EXPORT int mpg123_tclose(mpg123_handle *fr); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/deps/mpg123/ports/MSVC++/msvc.c b/deps/mpg123/ports/MSVC++/msvc.c new file mode 100644 index 0000000..97b0eec --- /dev/null +++ b/deps/mpg123/ports/MSVC++/msvc.c @@ -0,0 +1,59 @@ +/* + msvc: libmpg123 add-ons for MSVC++ + + copyright 1995-2008 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + + originally written by Patrick Dehne (inspired by libmpg123/readers.c) + +*/ + +#include "mpg123lib_intern.h" + +#include +#include +#include + +#include "debug.h" + +int mpg123_topen(mpg123_handle *fr, const _TCHAR *path) +{ + int ret; + int filept; /* descriptor of opened file/stream */ + + ret = mpg123_replace_reader(fr, _read, _lseek); + if(ret != MPG123_OK) + { + return ret; + } + + if((filept = _topen(path, O_RDONLY|O_BINARY)) < 0) + { + /* Will not work with unicode path name + if(NOQUIET) error2("Cannot open file %s: %s", path, strerror(errno)); */ + + if(NOQUIET) error1("Cannot open file: %s", strerror(errno)); + fr->err = MPG123_BAD_FILE; + return filept; /* error... */ + } + + if(mpg123_open_fd(fr, filept) == MPG123_OK) { + return MPG123_OK; + } + else + { + _close(filept); + return MPG123_ERR; + } +} + +int mpg123_tclose(mpg123_handle *fr) +{ + int ret, filept; + + filept = fr->rdat.filept; + ret = mpg123_close(fr); + _close(filept); + + return ret; +} diff --git a/deps/mpg123/ports/README b/deps/mpg123/ports/README new file mode 100644 index 0000000..f83b0cb --- /dev/null +++ b/deps/mpg123/ports/README @@ -0,0 +1,26 @@ +This directory contains some (contributed) works covering usage and/or building of mpg123/libmpg123 from different programming environments. +Note that those may be a bit outdated (especially when a file is added/removed in libmpg123 sources); as the team lacks resource to test everything. But in any case, the ports can provide a good starting point on the respective platform, to get it to work with minimal fuzz. + +- Delphi: mpg123_.pas + Unit for linking against libmpg123 (Win32, DLL). + ...by Arthur Pires +- Sony PSP: Sony_PSP/; building libmpg123 for the PSP (used for the MODO player). + ...by Bastian Pflieger +- MSVC++: Microsoft Windows / Visual C++ builds + - MSVC++/CMP3Stream: + project for building libmpg123 with interface class. + ...by "Gates Fan" + - MSVC++/mpg123.h + A wrapper header over mpg123.h.in (yes, the template file in ../src/libmpg123) to use in MSVC++ projects that link to libmpg123. + - MSVC++/2005 and MSVC++/2008 contain project files for building and using libmpg123 with the corresponding versions of Microsoft Visual C++. + To use it add the project to your solution. Then add a reference to libmpg123 from the project that wants to use it. + Also add ports/MSVC++ and src/libmpg123 to the include path. + If you want to use the asm build you will need yasm (http://www.tortall.net/projects/yasm/). + Please put yasm.exe into a directory where MSVC++ can find it. Finally switch the libmpg123 project to the + Release_MMX_Dll build using the Visual Studio Configuration Manager. + - Xcode contains the project file for building and using libmpg123 with + Xcode for Mac and iOS (arm and simulator builds). Please add the + ports/Xcode folder to the header search path of your project so that + Xcode can find the right mpg123.h and config.h. Then drag the mpg123 + Xcode project into your own project. Finally in your build target, build + phases, add mpg123-ios or mpg123-mac to the libraries to link. diff --git a/deps/mpg123/ports/Sony_PSP/Makefile.psp b/deps/mpg123/ports/Sony_PSP/Makefile.psp new file mode 100644 index 0000000..12d8664 --- /dev/null +++ b/deps/mpg123/ports/Sony_PSP/Makefile.psp @@ -0,0 +1,38 @@ +PSPSDK = $(shell psp-config --pspsdk-path) +PSPDIR = $(shell psp-config --psp-prefix) + +#DEFINES := PSP OPT_GENERIC REAL_IS_FIXED HAVE_CONFIG_H +DEFINES := PSP OPT_GENERIC REAL_IS_FLOAT HAVE_CONFIG_H +#DEFINES := PSP OPT_GENERIC FLOATOUT REAL_IS_FLOAT HAVE_CONFIG_H +DEFINEFLAGS := $(addprefix -D,$(DEFINES)) +INCDIR := ../. +CFLAGS = -g -O2 -Wall -fomit-frame-pointer -funroll-all-loops -finline-functions -ffast-math $(DEFINEFLAGS) + +MPG123_OBJS = compat.o parse.o frame.o format.o index.o synth.o synth_8bit.o \ + ntom.o icy2utf8.o synth_real.o synth_s32.o\ + equalizer.o icy.o id3.o layer1.o layer2.o layer3.o optimize.o readers.o tabinit.o stringbuf.o libmpg123.o dct64.o + +MPG123_LIB_FILE = ./libmpg123.a + +OBJS = $(MPG123_OBJS) +TARGET_LIB = $(MPG123_LIB_FILE) + +include $(PSPSDK)/lib/build.mak + + + +#################### +## Makefile rules ## +#################### + +install: $(MPG123_LIB_FILE) + @echo "" + @echo "**********************************************************************" + @echo "Installing libstsound into $(PSPDIR)" + @mkdir -p $(PSPDIR)/include $(PSPDIR)/lib + @cp -v mpg123.h $(PSPDIR)/include + @cp -v libmpg123.a $(PSPDIR)/lib + @echo "Done" + @echo "**********************************************************************" + @echo "" + diff --git a/deps/mpg123/ports/Sony_PSP/README b/deps/mpg123/ports/Sony_PSP/README new file mode 100644 index 0000000..ce9b45c --- /dev/null +++ b/deps/mpg123/ports/Sony_PSP/README @@ -0,0 +1,11 @@ +Hi + +* Place Makefile.psp in the directory src/libmpg123. +* Patch readers.c (present in src/libmpg123) using readers.c.patch +* Place Config.h in directory src/ +* cd to src/libmpg123 and do "make -f Makefile.psp install" + +Tested on mpg123 1.4.x and psptoolchain rev. 2398 + +Regards +Bastian diff --git a/deps/mpg123/ports/Sony_PSP/config.h b/deps/mpg123/ports/Sony_PSP/config.h new file mode 100644 index 0000000..957c5e9 --- /dev/null +++ b/deps/mpg123/ports/Sony_PSP/config.h @@ -0,0 +1,368 @@ +/* src/config.h. Generated from config.h.in by configure. */ +/* src/config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if your architecture wants/needs/can use attribute_align_arg and + alignment checks. It's for 32bit x86... */ +#define ABI_ALIGN_FUN 1 + +/* Define to use proper rounding. */ +/* #undef ACCURATE_ROUNDING */ + +/* Define if .align takes 3 for alignment of 2^3=8 bytes instead of 8. */ +/* #undef ASMALIGN_EXP */ + +/* Define if __attribute__((aligned(16))) shall be used */ +/* #undef CCALIGN */ + +/* Define if checking of stack alignment is wanted. */ +#define CHECK_ALIGN 1 + +/* Define if debugging is enabled. */ +/* #undef DEBUG */ + +/* The default audio output module(s) to use */ +#define DEFAULT_OUTPUT_MODULE "alsa,oss,esd,sdl,nas,arts" + +/* Define if building with dynamcally linked libmpg123 */ +#define DYNAMIC_BUILD 1 + +/* Define if FIFO support is enabled. */ +#define FIFO 1 + +/* Define if frame index should be used. */ +#define FRAME_INDEX 1 + +/* Define if gapless is enabled. */ +#define GAPLESS 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ALIB_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_INET_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ASM_AUDIOIO_H */ + +/* Define to 1 if you have the `atoll' function. */ +#define HAVE_ATOLL 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_AUDIOS_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_AUDIOTOOLBOX_AUDIOTOOLBOX_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_AUDIOUNIT_AUDIOUNIT_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_CORESERVICES_CORESERVICES_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_CULIB_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the `getaddrinfo' function. */ +#define HAVE_GETADDRINFO 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the `getuid' function. */ +#define HAVE_GETUID 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LANGINFO_H 1 + +/* Define to 1 if you have the `m' library (-lm). */ +#define HAVE_LIBM 1 + +/* Define to 1 if you have the `mx' library (-lmx). */ +/* #undef HAVE_LIBMX */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LINUX_SOUNDCARD_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define if libltdl is available */ +#define HAVE_LTDL 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MACHINE_SOUNDCARD_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `mkfifo' function. */ +#define HAVE_MKFIFO 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETDB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IN_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETINET_TCP_H */ + +/* Define to 1 if you have the `nl_langinfo' function. */ +#define HAVE_NL_LANGINFO 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_OS2ME_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_OS2_H */ + +/* Define to 1 if you have the `random' function. */ +#define HAVE_RANDOM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SCHED_H 1 + +/* Define to 1 if you have the `sched_setscheduler' function. */ +#define HAVE_SCHED_SETSCHEDULER 1 + +/* Define to 1 if you have the `setlocale' function. */ +#define HAVE_SETLOCALE 1 + +/* Define to 1 if you have the `setpriority' function. */ +#define HAVE_SETPRIORITY 1 + +/* Define to 1 if you have the `setuid' function. */ +#define HAVE_SETUID 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SIGNAL_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SNDIO_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strdup' function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the `strerror' function. */ +#define HAVE_STRERROR 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SUN_AUDIOIO_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_AUDIOIO_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_AUDIO_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SIGNAL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOUNDCARD_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_WAIT_H 1 + +/* Define this if you have the POSIX termios library */ +#define HAVE_TERMIOS 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Define to indicate that float storage follows IEEE754. */ +#define IEEE_FLOAT 1 + +/* size of the frame index seek table */ +#define INDEX_SIZE 1000 + +/* Define if IPV6 support is enabled. */ +#define IPV6 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Define if network support is enabled. */ +/* #define NETWORK 1 */ + +/* Define to disable 16 bit integer output. */ +/* #undef NO_16BIT */ + +/* Define to disable 32 bit integer output. */ +/* define NO_32BIT 1 */ + +/* Define to disable 8 bit integer output. */ +/* #undef NO_8BIT */ + +/* Define to disable downsampled decoding. */ +/* #undef NO_DOWNSAMPLE */ + +/* Define to disable error messages in combination with a return value (the + return is left intact). */ +/* #undef NO_ERETURN */ + +/* Define to disable error messages. */ +/* #undef NO_ERRORMSG */ + +/* Define to disable feeder and buffered readers. */ +/* #undef NO_FEEDER */ + +/* Define to disable ICY handling. */ +/* #undef NO_ICY */ + +/* Define to disable ID3v2 parsing. */ +/* #undef NO_ID3V2 */ + +/* Define to disable layer I. */ +/* #undef NO_LAYER1 */ + +/* Define to disable layer II. */ +/* #undef NO_LAYER2 */ + +/* Define to disable layer III. */ +/* #undef NO_LAYER3 */ + +/* Define to disable ntom resampling. */ +/* #undef NO_NTOM */ + +/* Define to disable real output. */ +/* define NO_REAL 1 */ + +/* Define to disable string functions. */ +/* #undef NO_STRING */ + +/* Define to disable warning messages. */ +/* #undef NO_WARNING */ + +/* Name of package */ +#define PACKAGE "mpg123" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "mpg123-devel@lists.sourceforge.net" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "mpg123" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "mpg123 1.8rc5" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "mpg123" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.8rc5" + +/* Define if portaudio v18 API is wanted. */ +/* #undef PORTAUDIO18 */ + +/* The size of `int32_t', as computed by sizeof. */ +#define SIZEOF_INT32_T 4 + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `off_t', as computed by sizeof. */ +#define SIZEOF_OFF_T 4 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 4 + +/* The size of `ssize_t', as computed by sizeof. */ +#define SIZEOF_SSIZE_T 4 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define if modules are enabled */ +#define USE_MODULES 1 + +/* Version number of package */ +#define VERSION "1.8rc5" + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to `short' if does not define. */ +/* #undef int16_t */ + +/* Define to `int' if does not define. */ +/* #undef int32_t */ + +/* Define to `long int' if does not define. */ +/* #undef off_t */ + +/* Define to `unsigned long' if does not define. */ +/* #undef size_t */ + +/* Define to `long' if does not define. */ +/* #undef ssize_t */ + +/* Define to `unsigned short' if does not define. */ +/* #undef uint16_t */ + +/* Define to `unsigned int' if does not define. */ +/* #undef uint32_t */ diff --git a/deps/mpg123/ports/Sony_PSP/readers.c.patch b/deps/mpg123/ports/Sony_PSP/readers.c.patch new file mode 100644 index 0000000..73bbb26 --- /dev/null +++ b/deps/mpg123/ports/Sony_PSP/readers.c.patch @@ -0,0 +1,2 @@ +14a15 +> #include diff --git a/deps/mpg123/ports/Xcode/config.h b/deps/mpg123/ports/Xcode/config.h new file mode 100644 index 0000000..651b521 --- /dev/null +++ b/deps/mpg123/ports/Xcode/config.h @@ -0,0 +1,197 @@ +#include "TargetConditionals.h" + +#if TARGET_IPHONE_SIMULATOR + #define DEFAULT_OUTPUT_MODULE "dummy" + /* #undef HAVE_AUDIOTOOLBOX_AUDIOTOOLBOX_H */ + /* #undef HAVE_AUDIOUNIT_AUDIOUNIT_H */ + /* #undef HAVE_CORESERVICES_CORESERVICES_H */ + /* #undef HAVE_OPENAL_ALC_H */ + /* #undef HAVE_OPENAL_AL_H */ + #define ABI_ALIGN_FUN 1 + #define HAVE_GAI_ADDRCONFIG 1 + #define LFS_ALIAS_BITS 32 + /* #undef HAVE_LIBMX */ + #define HAVE_MMAP 1 + #define IEEE_FLOAT 1 + #define SIZEOF_INT32_T 4 + #define SIZEOF_LONG 4 + #define SIZEOF_OFF_T 8 + #define SIZEOF_SIZE_T 4 + #define SIZEOF_SSIZE_T 4 + #define OPT_GENERIC +#elif TARGET_OS_IPHONE + #define DEFAULT_OUTPUT_MODULE "dummy" + /* #undef HAVE_AUDIOTOOLBOX_AUDIOTOOLBOX_H */ + /* #undef HAVE_AUDIOUNIT_AUDIOUNIT_H */ + /* #undef HAVE_CORESERVICES_CORESERVICES_H */ + /* #undef HAVE_OPENAL_ALC_H */ + /* #undef HAVE_OPENAL_AL_H */ + /* #undef ABI_ALIGN_FUN */ + /* #undef HAVE_GAI_ADDRCONFIG */ + #define LFS_ALIAS_BITS 32 + /* #undef HAVE_LIBMX */ + /* #undef HAVE_MMAP */ + /* #undef IEEE_FLOAT */ + #define SIZEOF_INT32_T 4 + #define SIZEOF_LONG 4 + #define SIZEOF_OFF_T 8 + #define SIZEOF_SIZE_T 4 + #define SIZEOF_SSIZE_T 4 + #define OPT_NEON +#elif TARGET_OS_MAC + #define DEFAULT_OUTPUT_MODULE "coreaudio" + #define HAVE_AUDIOTOOLBOX_AUDIOTOOLBOX_H 1 + #define HAVE_AUDIOUNIT_AUDIOUNIT_H 1 + #define HAVE_CORESERVICES_CORESERVICES_H 1 + #define HAVE_OPENAL_ALC_H 1 + #define HAVE_OPENAL_AL_H 1 + /* #undef ABI_ALIGN_FUN */ + #define HAVE_GAI_ADDRCONFIG 1 + #define LFS_ALIAS_BITS 64 + #define HAVE_LIBMX 1 + #define HAVE_MMAP 1 + #define IEEE_FLOAT 1 + #define SIZEOF_INT32_T 4 + #define SIZEOF_LONG 8 + #define SIZEOF_OFF_T 8 + #define SIZEOF_SIZE_T 8 + #define SIZEOF_SIZE_T 8 + #define SIZEOF_SSIZE_T 8 + #define OPT_GENERIC +#else + #error "Unknown target." +#endif + +/* #undef ACCURATE_ROUNDING */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ +#define ASMALIGN_EXP 1 +#define CCALIGN 1 +/* #undef DEBUG */ +/* #undef DYNAMIC_BUILD */ +#define FIFO 1 +#define FRAME_INDEX 1 +#define GAPLESS 1 +/* #undef HAVE_ALC_H */ +/* #undef HAVE_ALIB_H */ +/* #undef HAVE_AL_ALC_H */ +/* #undef HAVE_AL_AL_H */ +/* #undef HAVE_AL_H */ +#define HAVE_ARPA_INET_H 1 +/* #undef HAVE_ASM_AUDIOIO_H */ +#define HAVE_ATOLL 1 +/* #undef HAVE_AUDIOS_H */ +/* #undef HAVE_CULIB_H */ +#define HAVE_DLFCN_H 1 +#define HAVE_GETADDRINFO 1 +#define HAVE_GETPAGESIZE 1 +#define HAVE_GETUID 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_LANGINFO_H 1 +#define HAVE_LIBM 1 +#define HAVE_LIMITS_H 1 +/* #undef HAVE_LINUX_SOUNDCARD_H */ +#define HAVE_LOCALE_H 1 +/* #undef HAVE_LTDL */ +/* #undef HAVE_MACHINE_SOUNDCARD_H */ +#define HAVE_MEMORY_H 1 +#define HAVE_MKFIFO 1 +#define HAVE_NETDB_H 1 +#define HAVE_NETINET_IN_H 1 +/* #undef HAVE_NETINET_TCP_H */ +#define HAVE_NL_LANGINFO 1 +/* #undef HAVE_OS2ME_H */ +/* #undef HAVE_OS2_H */ +#define HAVE_RANDOM 1 +#define HAVE_SCHED_H 1 +/* #undef HAVE_SCHED_SETSCHEDULER */ +#define HAVE_SETLOCALE 1 +#define HAVE_SETPRIORITY 1 +#define HAVE_SETUID 1 +#define HAVE_SIGNAL_H 1 +/* #undef HAVE_SNDIO_H */ +#define HAVE_STDINT_H 1 +#define HAVE_STDIO_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRDUP 1 +#define HAVE_STRERROR 1 +#define HAVE_STRINGS_H 1 +#define HAVE_STRING_H 1 +/* #undef HAVE_SUN_AUDIOIO_H */ +/* #undef HAVE_SYS_AUDIOIO_H */ +/* #undef HAVE_SYS_AUDIO_H */ +#define HAVE_SYS_IOCTL_H 1 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_RESOURCE_H 1 +#define HAVE_SYS_SIGNAL_H 1 +#define HAVE_SYS_SOCKET_H 1 +/* #undef HAVE_SYS_SOUNDCARD_H */ +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_WAIT_H 1 +#define HAVE_TERMIOS 1 +#define HAVE_UNISTD_H 1 +/* #undef HAVE_WINDOWS_H */ +/* #undef HAVE_WS2TCPIP_H */ +#define INDEX_SIZE 1000 +#define IPV6 1 +#define LT_OBJDIR ".libs/" +#define MODULE_FILE_SUFFIX ".la" +#define NETWORK 1 +/* #undef NO_16BIT */ +/* #undef NO_32BIT */ +/* #undef NO_8BIT */ +/* #undef NO_DOWNSAMPLE */ +/* #undef NO_ERETURN */ +/* #undef NO_ERRORMSG */ +/* #undef NO_FEEDER */ +/* #undef NO_ICY */ +/* #undef NO_ID3V2 */ +/* #undef NO_LAYER1 */ +/* #undef NO_LAYER2 */ +/* #undef NO_LAYER3 */ +/* #undef NO_NTOM */ +/* #undef NO_REAL */ +/* #undef NO_STRING */ +/* #undef NO_WARNING */ +#define PACKAGE "mpg123" +#define PACKAGE_BUGREPORT "mpg123-devel@lists.sourceforge.net" +#define PACKAGE_NAME "mpg123" +#define PACKAGE_STRING "mpg123 1.14.0" +#define PACKAGE_TARNAME "mpg123" +#define PACKAGE_URL "" +#define PACKAGE_VERSION "1.14.0" +/* #undef PORTAUDIO18 */ +#define STDC_HEADERS 1 +/* #undef USE_MODULES */ +#define VERSION "1.14.0" +/* #undef WANT_WIN32_FIFO */ +/* #undef WANT_WIN32_SOCKETS */ +/* #undef WANT_WIN32_UNICODE */ +/* #undef WINVER */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif +/* #undef _FILE_OFFSET_BITS */ +/* #undef _LARGE_FILES */ +/* #undef _WIN32_WINNT */ +/* #undef const */ +#ifndef __cplusplus +/* #undef inline */ +#endif +/* #undef int16_t */ +/* #undef int32_t */ +/* #undef off_t */ +/* #undef size_t */ +/* #undef ssize_t */ +/* #undef uint16_t */ +/* #undef uint32_t */ +/* #undef uintptr_t */ + +#define REAL_IS_FLOAT diff --git a/deps/mpg123/ports/Xcode/mpg123.h b/deps/mpg123/ports/Xcode/mpg123.h new file mode 100644 index 0000000..9771180 --- /dev/null +++ b/deps/mpg123/ports/Xcode/mpg123.h @@ -0,0 +1,17 @@ +/* + mpg123.h: MPEG Audio Decoder library wrapper header for Xcode + + copyright 2012 by the mpg123 project - free software under the terms of the LGPL 2.1 + initially written by Patrick Dehne. +*/ + +#ifndef MPG123_XCODE_H +#define MPG123_XCODE_H + +#include +#include + +#define MPG123_NO_CONFIGURE +#include "../../src/libmpg123/mpg123.h.in" /* Yes, .h.in; we include the configure template! */ + +#endif diff --git a/deps/mpg123/ports/Xcode/mpg123.xcodeproj/project.pbxproj b/deps/mpg123/ports/Xcode/mpg123.xcodeproj/project.pbxproj new file mode 100644 index 0000000..30cb5c2 --- /dev/null +++ b/deps/mpg123/ports/Xcode/mpg123.xcodeproj/project.pbxproj @@ -0,0 +1,670 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + CD132C23152A4B8000B4F5A8 /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C21152A4B8000B4F5A8 /* config.h */; }; + CD132C24152A4B8000B4F5A8 /* mpg123.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C22152A4B8000B4F5A8 /* mpg123.h */; }; + CD132C7E152A4D7E00B4F5A8 /* compat.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C62152A4D7E00B4F5A8 /* compat.h */; }; + CD132C7F152A4D7E00B4F5A8 /* decode.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C63152A4D7E00B4F5A8 /* decode.h */; }; + CD132C80152A4D7E00B4F5A8 /* dither.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C64152A4D7E00B4F5A8 /* dither.h */; }; + CD132C81152A4D7E00B4F5A8 /* frame.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C65152A4D7E00B4F5A8 /* frame.h */; }; + CD132C82152A4D7E00B4F5A8 /* getbits.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C66152A4D7E00B4F5A8 /* getbits.h */; }; + CD132C83152A4D7E00B4F5A8 /* getcpuflags.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C67152A4D7E00B4F5A8 /* getcpuflags.h */; }; + CD132C84152A4D7E00B4F5A8 /* huffman.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C68152A4D7E00B4F5A8 /* huffman.h */; }; + CD132C85152A4D7E00B4F5A8 /* icy.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C69152A4D7E00B4F5A8 /* icy.h */; }; + CD132C86152A4D7E00B4F5A8 /* icy2utf8.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C6A152A4D7E00B4F5A8 /* icy2utf8.h */; }; + CD132C87152A4D7E00B4F5A8 /* id3.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C6B152A4D7E00B4F5A8 /* id3.h */; }; + CD132C88152A4D7E00B4F5A8 /* index.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C6C152A4D7E00B4F5A8 /* index.h */; }; + CD132C89152A4D7E00B4F5A8 /* intsym.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C6D152A4D7E00B4F5A8 /* intsym.h */; }; + CD132C8A152A4D7E00B4F5A8 /* l2tables.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C6E152A4D7E00B4F5A8 /* l2tables.h */; }; + CD132C8B152A4D7E00B4F5A8 /* l3_integer_tables.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C6F152A4D7E00B4F5A8 /* l3_integer_tables.h */; }; + CD132C8C152A4D7E00B4F5A8 /* l12_integer_tables.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C70152A4D7E00B4F5A8 /* l12_integer_tables.h */; }; + CD132C8D152A4D7E00B4F5A8 /* mangle.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C71152A4D7E00B4F5A8 /* mangle.h */; }; + CD132C8E152A4D7E00B4F5A8 /* mpg123lib_intern.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C73152A4D7E00B4F5A8 /* mpg123lib_intern.h */; }; + CD132C8F152A4D7E00B4F5A8 /* optimize.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C74152A4D7E00B4F5A8 /* optimize.h */; }; + CD132C90152A4D7E00B4F5A8 /* parse.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C75152A4D7E00B4F5A8 /* parse.h */; }; + CD132C91152A4D7E00B4F5A8 /* reader.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C76152A4D7E00B4F5A8 /* reader.h */; }; + CD132C92152A4D7E00B4F5A8 /* sample.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C77152A4D7E00B4F5A8 /* sample.h */; }; + CD132C93152A4D7E00B4F5A8 /* synth_8bit.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C78152A4D7E00B4F5A8 /* synth_8bit.h */; }; + CD132C94152A4D7E00B4F5A8 /* synth_mono.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C79152A4D7E00B4F5A8 /* synth_mono.h */; }; + CD132C95152A4D7E00B4F5A8 /* synth_ntom.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C7A152A4D7E00B4F5A8 /* synth_ntom.h */; }; + CD132C96152A4D7E00B4F5A8 /* synth.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C7B152A4D7E00B4F5A8 /* synth.h */; }; + CD132C97152A4D7E00B4F5A8 /* synths.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C7C152A4D7E00B4F5A8 /* synths.h */; }; + CD132C98152A4D7E00B4F5A8 /* true.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C7D152A4D7E00B4F5A8 /* true.h */; }; + CD132CB3152A4E7000B4F5A8 /* compat.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132C99152A4E7000B4F5A8 /* compat.c */; }; + CD132CB4152A4E7000B4F5A8 /* dct64.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132C9A152A4E7000B4F5A8 /* dct64.c */; }; + CD132CB5152A4E7000B4F5A8 /* dither.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132C9B152A4E7000B4F5A8 /* dither.c */; }; + CD132CB6152A4E7000B4F5A8 /* equalizer.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132C9C152A4E7000B4F5A8 /* equalizer.c */; }; + CD132CB7152A4E7000B4F5A8 /* feature.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132C9D152A4E7000B4F5A8 /* feature.c */; }; + CD132CB8152A4E7000B4F5A8 /* format.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132C9E152A4E7000B4F5A8 /* format.c */; }; + CD132CB9152A4E7000B4F5A8 /* frame.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132C9F152A4E7000B4F5A8 /* frame.c */; }; + CD132CBA152A4E7000B4F5A8 /* icy.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CA0152A4E7000B4F5A8 /* icy.c */; }; + CD132CBB152A4E7000B4F5A8 /* icy2utf8.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CA1152A4E7000B4F5A8 /* icy2utf8.c */; }; + CD132CBC152A4E7000B4F5A8 /* id3.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CA2152A4E7000B4F5A8 /* id3.c */; }; + CD132CBD152A4E7000B4F5A8 /* index.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CA3152A4E7000B4F5A8 /* index.c */; }; + CD132CBE152A4E7000B4F5A8 /* layer1.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CA4152A4E7000B4F5A8 /* layer1.c */; }; + CD132CBF152A4E7000B4F5A8 /* layer2.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CA5152A4E7000B4F5A8 /* layer2.c */; }; + CD132CC0152A4E7000B4F5A8 /* layer3.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CA6152A4E7000B4F5A8 /* layer3.c */; }; + CD132CC1152A4E7000B4F5A8 /* lfs_alias.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CA7152A4E7000B4F5A8 /* lfs_alias.c */; }; + CD132CC2152A4E7000B4F5A8 /* libmpg123.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CA8152A4E7000B4F5A8 /* libmpg123.c */; }; + CD132CC3152A4E7000B4F5A8 /* ntom.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CA9152A4E7000B4F5A8 /* ntom.c */; }; + CD132CC4152A4E7000B4F5A8 /* optimize.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CAA152A4E7000B4F5A8 /* optimize.c */; }; + CD132CC5152A4E7000B4F5A8 /* parse.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CAB152A4E7000B4F5A8 /* parse.c */; }; + CD132CC6152A4E7000B4F5A8 /* readers.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CAC152A4E7000B4F5A8 /* readers.c */; }; + CD132CC7152A4E7000B4F5A8 /* stringbuf.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CAD152A4E7000B4F5A8 /* stringbuf.c */; }; + CD132CC8152A4E7000B4F5A8 /* synth_8bit.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CAE152A4E7000B4F5A8 /* synth_8bit.c */; }; + CD132CC9152A4E7000B4F5A8 /* synth_real.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CAF152A4E7000B4F5A8 /* synth_real.c */; }; + CD132CCA152A4E7000B4F5A8 /* synth_s32.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CB0152A4E7000B4F5A8 /* synth_s32.c */; }; + CD132CCB152A4E7000B4F5A8 /* synth.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CB1152A4E7000B4F5A8 /* synth.c */; }; + CD132CCC152A4E7000B4F5A8 /* tabinit.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CB2152A4E7000B4F5A8 /* tabinit.c */; }; + CD132CD6152A511C00B4F5A8 /* dct64_neon_float.S in Sources */ = {isa = PBXBuildFile; fileRef = CD132CCD152A511800B4F5A8 /* dct64_neon_float.S */; }; + CD132CD7152A511C00B4F5A8 /* dct64_neon.S in Sources */ = {isa = PBXBuildFile; fileRef = CD132CCE152A511900B4F5A8 /* dct64_neon.S */; }; + CD132CD9152A511C00B4F5A8 /* synth_neon_float.S in Sources */ = {isa = PBXBuildFile; fileRef = CD132CD0152A511A00B4F5A8 /* synth_neon_float.S */; }; + CD132CDA152A511C00B4F5A8 /* synth_neon_s32.S in Sources */ = {isa = PBXBuildFile; fileRef = CD132CD1152A511A00B4F5A8 /* synth_neon_s32.S */; }; + CD132CDB152A511C00B4F5A8 /* synth_neon.S in Sources */ = {isa = PBXBuildFile; fileRef = CD132CD2152A511A00B4F5A8 /* synth_neon.S */; }; + CD132CDC152A511C00B4F5A8 /* synth_stereo_neon_float.S in Sources */ = {isa = PBXBuildFile; fileRef = CD132CD3152A511B00B4F5A8 /* synth_stereo_neon_float.S */; }; + CD132CDD152A511C00B4F5A8 /* synth_stereo_neon_s32.S in Sources */ = {isa = PBXBuildFile; fileRef = CD132CD4152A511B00B4F5A8 /* synth_stereo_neon_s32.S */; }; + CD132CDE152A511C00B4F5A8 /* synth_stereo_neon.S in Sources */ = {isa = PBXBuildFile; fileRef = CD132CD5152A511C00B4F5A8 /* synth_stereo_neon.S */; }; + CDB0288C152B760700B01410 /* compat.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132C99152A4E7000B4F5A8 /* compat.c */; }; + CDB0288D152B760700B01410 /* compat.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C62152A4D7E00B4F5A8 /* compat.h */; }; + CDB0288E152B760700B01410 /* dct64.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132C9A152A4E7000B4F5A8 /* dct64.c */; }; + CDB02890152B760D00B01410 /* decode.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C63152A4D7E00B4F5A8 /* decode.h */; }; + CDB02891152B760D00B01410 /* dither.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C64152A4D7E00B4F5A8 /* dither.h */; }; + CDB02892152B760D00B01410 /* dither.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132C9B152A4E7000B4F5A8 /* dither.c */; }; + CDB02893152B760D00B01410 /* equalizer.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132C9C152A4E7000B4F5A8 /* equalizer.c */; }; + CDB02894152B760D00B01410 /* feature.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132C9D152A4E7000B4F5A8 /* feature.c */; }; + CDB02895152B760D00B01410 /* format.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132C9E152A4E7000B4F5A8 /* format.c */; }; + CDB02896152B761300B01410 /* frame.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C65152A4D7E00B4F5A8 /* frame.h */; }; + CDB02897152B761300B01410 /* frame.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132C9F152A4E7000B4F5A8 /* frame.c */; }; + CDB02898152B761300B01410 /* getbits.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C66152A4D7E00B4F5A8 /* getbits.h */; }; + CDB02899152B761300B01410 /* getcpuflags.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C67152A4D7E00B4F5A8 /* getcpuflags.h */; }; + CDB0289A152B761300B01410 /* huffman.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C68152A4D7E00B4F5A8 /* huffman.h */; }; + CDB0289B152B761300B01410 /* icy.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C69152A4D7E00B4F5A8 /* icy.h */; }; + CDB0289C152B761300B01410 /* icy.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CA0152A4E7000B4F5A8 /* icy.c */; }; + CDB0289D152B761300B01410 /* icy2utf8.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C6A152A4D7E00B4F5A8 /* icy2utf8.h */; }; + CDB0289E152B761300B01410 /* icy2utf8.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CA1152A4E7000B4F5A8 /* icy2utf8.c */; }; + CDB0289F152B761C00B01410 /* id3.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C6B152A4D7E00B4F5A8 /* id3.h */; }; + CDB028A0152B761C00B01410 /* id3.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CA2152A4E7000B4F5A8 /* id3.c */; }; + CDB028A1152B761C00B01410 /* index.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C6C152A4D7E00B4F5A8 /* index.h */; }; + CDB028A2152B761C00B01410 /* index.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CA3152A4E7000B4F5A8 /* index.c */; }; + CDB028A3152B761C00B01410 /* intsym.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C6D152A4D7E00B4F5A8 /* intsym.h */; }; + CDB028A4152B761C00B01410 /* l2tables.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C6E152A4D7E00B4F5A8 /* l2tables.h */; }; + CDB028A5152B761C00B01410 /* l3_integer_tables.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C6F152A4D7E00B4F5A8 /* l3_integer_tables.h */; }; + CDB028A6152B761C00B01410 /* l12_integer_tables.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C70152A4D7E00B4F5A8 /* l12_integer_tables.h */; }; + CDB028A7152B761C00B01410 /* layer1.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CA4152A4E7000B4F5A8 /* layer1.c */; }; + CDB028A8152B762E00B01410 /* layer2.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CA5152A4E7000B4F5A8 /* layer2.c */; }; + CDB028A9152B763500B01410 /* layer3.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CA6152A4E7000B4F5A8 /* layer3.c */; }; + CDB028AA152B763500B01410 /* lfs_alias.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CA7152A4E7000B4F5A8 /* lfs_alias.c */; }; + CDB028AB152B763500B01410 /* libmpg123.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CA8152A4E7000B4F5A8 /* libmpg123.c */; }; + CDB028AC152B763500B01410 /* mangle.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C71152A4D7E00B4F5A8 /* mangle.h */; }; + CDB028AD152B764100B01410 /* mpg123lib_intern.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C73152A4D7E00B4F5A8 /* mpg123lib_intern.h */; }; + CDB028AE152B764100B01410 /* ntom.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CA9152A4E7000B4F5A8 /* ntom.c */; }; + CDB028AF152B764100B01410 /* optimize.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C74152A4D7E00B4F5A8 /* optimize.h */; }; + CDB028B0152B764100B01410 /* optimize.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CAA152A4E7000B4F5A8 /* optimize.c */; }; + CDB028B1152B764100B01410 /* parse.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C75152A4D7E00B4F5A8 /* parse.h */; }; + CDB028B2152B764100B01410 /* parse.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CAB152A4E7000B4F5A8 /* parse.c */; }; + CDB028B3152B764100B01410 /* reader.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C76152A4D7E00B4F5A8 /* reader.h */; }; + CDB028B4152B764100B01410 /* readers.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CAC152A4E7000B4F5A8 /* readers.c */; }; + CDB028B5152B764900B01410 /* sample.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C77152A4D7E00B4F5A8 /* sample.h */; }; + CDB028B6152B764900B01410 /* stringbuf.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CAD152A4E7000B4F5A8 /* stringbuf.c */; }; + CDB028B7152B764900B01410 /* synth.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CB1152A4E7000B4F5A8 /* synth.c */; }; + CDB028B8152B764900B01410 /* synth_8bit.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C78152A4D7E00B4F5A8 /* synth_8bit.h */; }; + CDB028B9152B764900B01410 /* synth_8bit.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CAE152A4E7000B4F5A8 /* synth_8bit.c */; }; + CDB028BA152B764900B01410 /* synth_mono.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C79152A4D7E00B4F5A8 /* synth_mono.h */; }; + CDB028BB152B764900B01410 /* synth_ntom.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C7A152A4D7E00B4F5A8 /* synth_ntom.h */; }; + CDB028BC152B764900B01410 /* synth_real.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CAF152A4E7000B4F5A8 /* synth_real.c */; }; + CDB028BD152B764900B01410 /* synth_s32.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CB0152A4E7000B4F5A8 /* synth_s32.c */; }; + CDB028BE152B765000B01410 /* synth.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C7B152A4D7E00B4F5A8 /* synth.h */; }; + CDB028BF152B765000B01410 /* synths.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C7C152A4D7E00B4F5A8 /* synths.h */; }; + CDB028C0152B765000B01410 /* tabinit.c in Sources */ = {isa = PBXBuildFile; fileRef = CD132CB2152A4E7000B4F5A8 /* tabinit.c */; }; + CDB028C1152B765000B01410 /* true.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C7D152A4D7E00B4F5A8 /* true.h */; }; + CDB028C2152B765900B01410 /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C21152A4B8000B4F5A8 /* config.h */; }; + CDB028C3152B765900B01410 /* mpg123.h in Headers */ = {isa = PBXBuildFile; fileRef = CD132C22152A4B8000B4F5A8 /* mpg123.h */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + CD132C0E152A48C200B4F5A8 /* libmpg123-ios.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libmpg123-ios.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + CD132C21152A4B8000B4F5A8 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = SOURCE_ROOT; }; + CD132C22152A4B8000B4F5A8 /* mpg123.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mpg123.h; sourceTree = SOURCE_ROOT; }; + CD132C62152A4D7E00B4F5A8 /* compat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = compat.h; sourceTree = ""; }; + CD132C63152A4D7E00B4F5A8 /* decode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = decode.h; sourceTree = ""; }; + CD132C64152A4D7E00B4F5A8 /* dither.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dither.h; sourceTree = ""; }; + CD132C65152A4D7E00B4F5A8 /* frame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = frame.h; sourceTree = ""; }; + CD132C66152A4D7E00B4F5A8 /* getbits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = getbits.h; sourceTree = ""; }; + CD132C67152A4D7E00B4F5A8 /* getcpuflags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = getcpuflags.h; sourceTree = ""; }; + CD132C68152A4D7E00B4F5A8 /* huffman.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = huffman.h; sourceTree = ""; }; + CD132C69152A4D7E00B4F5A8 /* icy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = icy.h; sourceTree = ""; }; + CD132C6A152A4D7E00B4F5A8 /* icy2utf8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = icy2utf8.h; sourceTree = ""; }; + CD132C6B152A4D7E00B4F5A8 /* id3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = id3.h; sourceTree = ""; }; + CD132C6C152A4D7E00B4F5A8 /* index.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = index.h; sourceTree = ""; }; + CD132C6D152A4D7E00B4F5A8 /* intsym.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = intsym.h; sourceTree = ""; }; + CD132C6E152A4D7E00B4F5A8 /* l2tables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = l2tables.h; sourceTree = ""; }; + CD132C6F152A4D7E00B4F5A8 /* l3_integer_tables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = l3_integer_tables.h; sourceTree = ""; }; + CD132C70152A4D7E00B4F5A8 /* l12_integer_tables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = l12_integer_tables.h; sourceTree = ""; }; + CD132C71152A4D7E00B4F5A8 /* mangle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mangle.h; sourceTree = ""; }; + CD132C72152A4D7E00B4F5A8 /* mpg123.h.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = mpg123.h.in; sourceTree = ""; }; + CD132C73152A4D7E00B4F5A8 /* mpg123lib_intern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mpg123lib_intern.h; sourceTree = ""; }; + CD132C74152A4D7E00B4F5A8 /* optimize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = optimize.h; sourceTree = ""; }; + CD132C75152A4D7E00B4F5A8 /* parse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = parse.h; sourceTree = ""; }; + CD132C76152A4D7E00B4F5A8 /* reader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = reader.h; sourceTree = ""; }; + CD132C77152A4D7E00B4F5A8 /* sample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sample.h; sourceTree = ""; }; + CD132C78152A4D7E00B4F5A8 /* synth_8bit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = synth_8bit.h; sourceTree = ""; }; + CD132C79152A4D7E00B4F5A8 /* synth_mono.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = synth_mono.h; sourceTree = ""; }; + CD132C7A152A4D7E00B4F5A8 /* synth_ntom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = synth_ntom.h; sourceTree = ""; }; + CD132C7B152A4D7E00B4F5A8 /* synth.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = synth.h; sourceTree = ""; }; + CD132C7C152A4D7E00B4F5A8 /* synths.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = synths.h; sourceTree = ""; }; + CD132C7D152A4D7E00B4F5A8 /* true.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = true.h; sourceTree = ""; }; + CD132C99152A4E7000B4F5A8 /* compat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = compat.c; sourceTree = ""; }; + CD132C9A152A4E7000B4F5A8 /* dct64.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dct64.c; sourceTree = ""; }; + CD132C9B152A4E7000B4F5A8 /* dither.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dither.c; sourceTree = ""; }; + CD132C9C152A4E7000B4F5A8 /* equalizer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = equalizer.c; sourceTree = ""; }; + CD132C9D152A4E7000B4F5A8 /* feature.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = feature.c; sourceTree = ""; }; + CD132C9E152A4E7000B4F5A8 /* format.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = format.c; sourceTree = ""; }; + CD132C9F152A4E7000B4F5A8 /* frame.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = frame.c; sourceTree = ""; }; + CD132CA0152A4E7000B4F5A8 /* icy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = icy.c; sourceTree = ""; }; + CD132CA1152A4E7000B4F5A8 /* icy2utf8.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = icy2utf8.c; sourceTree = ""; }; + CD132CA2152A4E7000B4F5A8 /* id3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = id3.c; sourceTree = ""; }; + CD132CA3152A4E7000B4F5A8 /* index.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = index.c; sourceTree = ""; }; + CD132CA4152A4E7000B4F5A8 /* layer1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = layer1.c; sourceTree = ""; }; + CD132CA5152A4E7000B4F5A8 /* layer2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = layer2.c; sourceTree = ""; }; + CD132CA6152A4E7000B4F5A8 /* layer3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = layer3.c; sourceTree = ""; }; + CD132CA7152A4E7000B4F5A8 /* lfs_alias.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = lfs_alias.c; sourceTree = ""; }; + CD132CA8152A4E7000B4F5A8 /* libmpg123.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = libmpg123.c; sourceTree = ""; }; + CD132CA9152A4E7000B4F5A8 /* ntom.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ntom.c; sourceTree = ""; }; + CD132CAA152A4E7000B4F5A8 /* optimize.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = optimize.c; sourceTree = ""; }; + CD132CAB152A4E7000B4F5A8 /* parse.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = parse.c; sourceTree = ""; }; + CD132CAC152A4E7000B4F5A8 /* readers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = readers.c; sourceTree = ""; }; + CD132CAD152A4E7000B4F5A8 /* stringbuf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = stringbuf.c; sourceTree = ""; }; + CD132CAE152A4E7000B4F5A8 /* synth_8bit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = synth_8bit.c; sourceTree = ""; }; + CD132CAF152A4E7000B4F5A8 /* synth_real.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = synth_real.c; sourceTree = ""; }; + CD132CB0152A4E7000B4F5A8 /* synth_s32.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = synth_s32.c; sourceTree = ""; }; + CD132CB1152A4E7000B4F5A8 /* synth.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = synth.c; sourceTree = ""; }; + CD132CB2152A4E7000B4F5A8 /* tabinit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tabinit.c; sourceTree = ""; }; + CD132CCD152A511800B4F5A8 /* dct64_neon_float.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = dct64_neon_float.S; sourceTree = ""; }; + CD132CCE152A511900B4F5A8 /* dct64_neon.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = dct64_neon.S; sourceTree = ""; }; + CD132CD0152A511A00B4F5A8 /* synth_neon_float.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = synth_neon_float.S; sourceTree = ""; }; + CD132CD1152A511A00B4F5A8 /* synth_neon_s32.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = synth_neon_s32.S; sourceTree = ""; }; + CD132CD2152A511A00B4F5A8 /* synth_neon.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = synth_neon.S; sourceTree = ""; }; + CD132CD3152A511B00B4F5A8 /* synth_stereo_neon_float.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = synth_stereo_neon_float.S; sourceTree = ""; }; + CD132CD4152A511B00B4F5A8 /* synth_stereo_neon_s32.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = synth_stereo_neon_s32.S; sourceTree = ""; }; + CD132CD5152A511C00B4F5A8 /* synth_stereo_neon.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = synth_stereo_neon.S; sourceTree = ""; }; + CD6D72D1152B748200CF4285 /* libmpg123-mac.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libmpg123-mac.a"; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + CD132C0B152A48C200B4F5A8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + CD6D72CE152B748200CF4285 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + CD132C03152A48C100B4F5A8 = { + isa = PBXGroup; + children = ( + CD132C60152A4C9A00B4F5A8 /* src */, + CD132C13152A48C200B4F5A8 /* Xcode */, + CD132C0F152A48C200B4F5A8 /* Products */, + ); + sourceTree = ""; + }; + CD132C0F152A48C200B4F5A8 /* Products */ = { + isa = PBXGroup; + children = ( + CD132C0E152A48C200B4F5A8 /* libmpg123-ios.a */, + CD6D72D1152B748200CF4285 /* libmpg123-mac.a */, + ); + name = Products; + sourceTree = ""; + }; + CD132C13152A48C200B4F5A8 /* Xcode */ = { + isa = PBXGroup; + children = ( + CD132C21152A4B8000B4F5A8 /* config.h */, + CD132C22152A4B8000B4F5A8 /* mpg123.h */, + ); + name = Xcode; + sourceTree = ""; + }; + CD132C60152A4C9A00B4F5A8 /* src */ = { + isa = PBXGroup; + children = ( + CD132C61152A4CA400B4F5A8 /* libmpg123 */, + ); + name = src; + path = ../../src; + sourceTree = SOURCE_ROOT; + }; + CD132C61152A4CA400B4F5A8 /* libmpg123 */ = { + isa = PBXGroup; + children = ( + CD132C99152A4E7000B4F5A8 /* compat.c */, + CD132C62152A4D7E00B4F5A8 /* compat.h */, + CD132C9A152A4E7000B4F5A8 /* dct64.c */, + CD132CCD152A511800B4F5A8 /* dct64_neon_float.S */, + CD132CCE152A511900B4F5A8 /* dct64_neon.S */, + CD132C63152A4D7E00B4F5A8 /* decode.h */, + CD132C64152A4D7E00B4F5A8 /* dither.h */, + CD132C9B152A4E7000B4F5A8 /* dither.c */, + CD132C9C152A4E7000B4F5A8 /* equalizer.c */, + CD132C9D152A4E7000B4F5A8 /* feature.c */, + CD132C9E152A4E7000B4F5A8 /* format.c */, + CD132C65152A4D7E00B4F5A8 /* frame.h */, + CD132C9F152A4E7000B4F5A8 /* frame.c */, + CD132C66152A4D7E00B4F5A8 /* getbits.h */, + CD132C67152A4D7E00B4F5A8 /* getcpuflags.h */, + CD132C68152A4D7E00B4F5A8 /* huffman.h */, + CD132C69152A4D7E00B4F5A8 /* icy.h */, + CD132CA0152A4E7000B4F5A8 /* icy.c */, + CD132C6A152A4D7E00B4F5A8 /* icy2utf8.h */, + CD132CA1152A4E7000B4F5A8 /* icy2utf8.c */, + CD132C6B152A4D7E00B4F5A8 /* id3.h */, + CD132CA2152A4E7000B4F5A8 /* id3.c */, + CD132C6C152A4D7E00B4F5A8 /* index.h */, + CD132CA3152A4E7000B4F5A8 /* index.c */, + CD132C6D152A4D7E00B4F5A8 /* intsym.h */, + CD132C6E152A4D7E00B4F5A8 /* l2tables.h */, + CD132C6F152A4D7E00B4F5A8 /* l3_integer_tables.h */, + CD132C70152A4D7E00B4F5A8 /* l12_integer_tables.h */, + CD132CA4152A4E7000B4F5A8 /* layer1.c */, + CD132CA5152A4E7000B4F5A8 /* layer2.c */, + CD132CA6152A4E7000B4F5A8 /* layer3.c */, + CD132CA7152A4E7000B4F5A8 /* lfs_alias.c */, + CD132CA8152A4E7000B4F5A8 /* libmpg123.c */, + CD132C71152A4D7E00B4F5A8 /* mangle.h */, + CD132C72152A4D7E00B4F5A8 /* mpg123.h.in */, + CD132C73152A4D7E00B4F5A8 /* mpg123lib_intern.h */, + CD132CA9152A4E7000B4F5A8 /* ntom.c */, + CD132C74152A4D7E00B4F5A8 /* optimize.h */, + CD132CAA152A4E7000B4F5A8 /* optimize.c */, + CD132C75152A4D7E00B4F5A8 /* parse.h */, + CD132CAB152A4E7000B4F5A8 /* parse.c */, + CD132C76152A4D7E00B4F5A8 /* reader.h */, + CD132CAC152A4E7000B4F5A8 /* readers.c */, + CD132C77152A4D7E00B4F5A8 /* sample.h */, + CD132CAD152A4E7000B4F5A8 /* stringbuf.c */, + CD132CB1152A4E7000B4F5A8 /* synth.c */, + CD132C78152A4D7E00B4F5A8 /* synth_8bit.h */, + CD132CAE152A4E7000B4F5A8 /* synth_8bit.c */, + CD132C79152A4D7E00B4F5A8 /* synth_mono.h */, + CD132C7A152A4D7E00B4F5A8 /* synth_ntom.h */, + CD132CAF152A4E7000B4F5A8 /* synth_real.c */, + CD132CB0152A4E7000B4F5A8 /* synth_s32.c */, + CD132CD0152A511A00B4F5A8 /* synth_neon_float.S */, + CD132CD1152A511A00B4F5A8 /* synth_neon_s32.S */, + CD132CD2152A511A00B4F5A8 /* synth_neon.S */, + CD132CD3152A511B00B4F5A8 /* synth_stereo_neon_float.S */, + CD132CD4152A511B00B4F5A8 /* synth_stereo_neon_s32.S */, + CD132CD5152A511C00B4F5A8 /* synth_stereo_neon.S */, + CD132C7B152A4D7E00B4F5A8 /* synth.h */, + CD132C7C152A4D7E00B4F5A8 /* synths.h */, + CD132CB2152A4E7000B4F5A8 /* tabinit.c */, + CD132C7D152A4D7E00B4F5A8 /* true.h */, + ); + path = libmpg123; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + CD132C0C152A48C200B4F5A8 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + CD132C23152A4B8000B4F5A8 /* config.h in Headers */, + CD132C24152A4B8000B4F5A8 /* mpg123.h in Headers */, + CD132C7E152A4D7E00B4F5A8 /* compat.h in Headers */, + CD132C7F152A4D7E00B4F5A8 /* decode.h in Headers */, + CD132C80152A4D7E00B4F5A8 /* dither.h in Headers */, + CD132C81152A4D7E00B4F5A8 /* frame.h in Headers */, + CD132C82152A4D7E00B4F5A8 /* getbits.h in Headers */, + CD132C83152A4D7E00B4F5A8 /* getcpuflags.h in Headers */, + CD132C84152A4D7E00B4F5A8 /* huffman.h in Headers */, + CD132C85152A4D7E00B4F5A8 /* icy.h in Headers */, + CD132C86152A4D7E00B4F5A8 /* icy2utf8.h in Headers */, + CD132C87152A4D7E00B4F5A8 /* id3.h in Headers */, + CD132C88152A4D7E00B4F5A8 /* index.h in Headers */, + CD132C89152A4D7E00B4F5A8 /* intsym.h in Headers */, + CD132C8A152A4D7E00B4F5A8 /* l2tables.h in Headers */, + CD132C8B152A4D7E00B4F5A8 /* l3_integer_tables.h in Headers */, + CD132C8C152A4D7E00B4F5A8 /* l12_integer_tables.h in Headers */, + CD132C8D152A4D7E00B4F5A8 /* mangle.h in Headers */, + CD132C8E152A4D7E00B4F5A8 /* mpg123lib_intern.h in Headers */, + CD132C8F152A4D7E00B4F5A8 /* optimize.h in Headers */, + CD132C90152A4D7E00B4F5A8 /* parse.h in Headers */, + CD132C91152A4D7E00B4F5A8 /* reader.h in Headers */, + CD132C92152A4D7E00B4F5A8 /* sample.h in Headers */, + CD132C93152A4D7E00B4F5A8 /* synth_8bit.h in Headers */, + CD132C94152A4D7E00B4F5A8 /* synth_mono.h in Headers */, + CD132C95152A4D7E00B4F5A8 /* synth_ntom.h in Headers */, + CD132C96152A4D7E00B4F5A8 /* synth.h in Headers */, + CD132C97152A4D7E00B4F5A8 /* synths.h in Headers */, + CD132C98152A4D7E00B4F5A8 /* true.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + CD6D72CF152B748200CF4285 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + CDB0288D152B760700B01410 /* compat.h in Headers */, + CDB02890152B760D00B01410 /* decode.h in Headers */, + CDB02891152B760D00B01410 /* dither.h in Headers */, + CDB02896152B761300B01410 /* frame.h in Headers */, + CDB02898152B761300B01410 /* getbits.h in Headers */, + CDB02899152B761300B01410 /* getcpuflags.h in Headers */, + CDB0289A152B761300B01410 /* huffman.h in Headers */, + CDB0289B152B761300B01410 /* icy.h in Headers */, + CDB0289D152B761300B01410 /* icy2utf8.h in Headers */, + CDB0289F152B761C00B01410 /* id3.h in Headers */, + CDB028A1152B761C00B01410 /* index.h in Headers */, + CDB028A3152B761C00B01410 /* intsym.h in Headers */, + CDB028A4152B761C00B01410 /* l2tables.h in Headers */, + CDB028A5152B761C00B01410 /* l3_integer_tables.h in Headers */, + CDB028A6152B761C00B01410 /* l12_integer_tables.h in Headers */, + CDB028AC152B763500B01410 /* mangle.h in Headers */, + CDB028AD152B764100B01410 /* mpg123lib_intern.h in Headers */, + CDB028AF152B764100B01410 /* optimize.h in Headers */, + CDB028B1152B764100B01410 /* parse.h in Headers */, + CDB028B3152B764100B01410 /* reader.h in Headers */, + CDB028B5152B764900B01410 /* sample.h in Headers */, + CDB028B8152B764900B01410 /* synth_8bit.h in Headers */, + CDB028BA152B764900B01410 /* synth_mono.h in Headers */, + CDB028BB152B764900B01410 /* synth_ntom.h in Headers */, + CDB028BE152B765000B01410 /* synth.h in Headers */, + CDB028BF152B765000B01410 /* synths.h in Headers */, + CDB028C1152B765000B01410 /* true.h in Headers */, + CDB028C2152B765900B01410 /* config.h in Headers */, + CDB028C3152B765900B01410 /* mpg123.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + CD132C0D152A48C200B4F5A8 /* mpg123-ios */ = { + isa = PBXNativeTarget; + buildConfigurationList = CD132C1B152A48C200B4F5A8 /* Build configuration list for PBXNativeTarget "mpg123-ios" */; + buildPhases = ( + CD132C0A152A48C200B4F5A8 /* Sources */, + CD132C0B152A48C200B4F5A8 /* Frameworks */, + CD132C0C152A48C200B4F5A8 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "mpg123-ios"; + productName = libmpg123; + productReference = CD132C0E152A48C200B4F5A8 /* libmpg123-ios.a */; + productType = "com.apple.product-type.library.static"; + }; + CD6D72D0152B748200CF4285 /* mpg123-mac */ = { + isa = PBXNativeTarget; + buildConfigurationList = CD6D72D4152B748200CF4285 /* Build configuration list for PBXNativeTarget "mpg123-mac" */; + buildPhases = ( + CD6D72CD152B748200CF4285 /* Sources */, + CD6D72CE152B748200CF4285 /* Frameworks */, + CD6D72CF152B748200CF4285 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "mpg123-mac"; + productName = "mpg123-mac"; + productReference = CD6D72D1152B748200CF4285 /* libmpg123-mac.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + CD132C05152A48C100B4F5A8 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0430; + }; + buildConfigurationList = CD132C08152A48C100B4F5A8 /* Build configuration list for PBXProject "mpg123" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = CD132C03152A48C100B4F5A8; + productRefGroup = CD132C0F152A48C200B4F5A8 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + CD132C0D152A48C200B4F5A8 /* mpg123-ios */, + CD6D72D0152B748200CF4285 /* mpg123-mac */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + CD132C0A152A48C200B4F5A8 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + CD132CB3152A4E7000B4F5A8 /* compat.c in Sources */, + CD132CB4152A4E7000B4F5A8 /* dct64.c in Sources */, + CD132CB5152A4E7000B4F5A8 /* dither.c in Sources */, + CD132CB6152A4E7000B4F5A8 /* equalizer.c in Sources */, + CD132CB7152A4E7000B4F5A8 /* feature.c in Sources */, + CD132CB8152A4E7000B4F5A8 /* format.c in Sources */, + CD132CB9152A4E7000B4F5A8 /* frame.c in Sources */, + CD132CBA152A4E7000B4F5A8 /* icy.c in Sources */, + CD132CBB152A4E7000B4F5A8 /* icy2utf8.c in Sources */, + CD132CBC152A4E7000B4F5A8 /* id3.c in Sources */, + CD132CBD152A4E7000B4F5A8 /* index.c in Sources */, + CD132CBE152A4E7000B4F5A8 /* layer1.c in Sources */, + CD132CBF152A4E7000B4F5A8 /* layer2.c in Sources */, + CD132CC0152A4E7000B4F5A8 /* layer3.c in Sources */, + CD132CC1152A4E7000B4F5A8 /* lfs_alias.c in Sources */, + CD132CC2152A4E7000B4F5A8 /* libmpg123.c in Sources */, + CD132CC3152A4E7000B4F5A8 /* ntom.c in Sources */, + CD132CC4152A4E7000B4F5A8 /* optimize.c in Sources */, + CD132CC5152A4E7000B4F5A8 /* parse.c in Sources */, + CD132CC6152A4E7000B4F5A8 /* readers.c in Sources */, + CD132CC7152A4E7000B4F5A8 /* stringbuf.c in Sources */, + CD132CC8152A4E7000B4F5A8 /* synth_8bit.c in Sources */, + CD132CC9152A4E7000B4F5A8 /* synth_real.c in Sources */, + CD132CCA152A4E7000B4F5A8 /* synth_s32.c in Sources */, + CD132CCB152A4E7000B4F5A8 /* synth.c in Sources */, + CD132CCC152A4E7000B4F5A8 /* tabinit.c in Sources */, + CD132CD6152A511C00B4F5A8 /* dct64_neon_float.S in Sources */, + CD132CD7152A511C00B4F5A8 /* dct64_neon.S in Sources */, + CD132CD9152A511C00B4F5A8 /* synth_neon_float.S in Sources */, + CD132CDA152A511C00B4F5A8 /* synth_neon_s32.S in Sources */, + CD132CDB152A511C00B4F5A8 /* synth_neon.S in Sources */, + CD132CDC152A511C00B4F5A8 /* synth_stereo_neon_float.S in Sources */, + CD132CDD152A511C00B4F5A8 /* synth_stereo_neon_s32.S in Sources */, + CD132CDE152A511C00B4F5A8 /* synth_stereo_neon.S in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + CD6D72CD152B748200CF4285 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + CDB0288C152B760700B01410 /* compat.c in Sources */, + CDB0288E152B760700B01410 /* dct64.c in Sources */, + CDB02892152B760D00B01410 /* dither.c in Sources */, + CDB02893152B760D00B01410 /* equalizer.c in Sources */, + CDB02894152B760D00B01410 /* feature.c in Sources */, + CDB02895152B760D00B01410 /* format.c in Sources */, + CDB02897152B761300B01410 /* frame.c in Sources */, + CDB0289C152B761300B01410 /* icy.c in Sources */, + CDB0289E152B761300B01410 /* icy2utf8.c in Sources */, + CDB028A0152B761C00B01410 /* id3.c in Sources */, + CDB028A2152B761C00B01410 /* index.c in Sources */, + CDB028A7152B761C00B01410 /* layer1.c in Sources */, + CDB028A8152B762E00B01410 /* layer2.c in Sources */, + CDB028A9152B763500B01410 /* layer3.c in Sources */, + CDB028AA152B763500B01410 /* lfs_alias.c in Sources */, + CDB028AB152B763500B01410 /* libmpg123.c in Sources */, + CDB028AE152B764100B01410 /* ntom.c in Sources */, + CDB028B0152B764100B01410 /* optimize.c in Sources */, + CDB028B2152B764100B01410 /* parse.c in Sources */, + CDB028B4152B764100B01410 /* readers.c in Sources */, + CDB028B6152B764900B01410 /* stringbuf.c in Sources */, + CDB028B7152B764900B01410 /* synth.c in Sources */, + CDB028B9152B764900B01410 /* synth_8bit.c in Sources */, + CDB028BC152B764900B01410 /* synth_real.c in Sources */, + CDB028BD152B764900B01410 /* synth_s32.c in Sources */, + CDB028C0152B765000B01410 /* tabinit.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + CD132C19152A48C200B4F5A8 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + COPY_PHASE_STRIP = NO; + EXCLUDED_SOURCE_FILE_NAMES = ""; + "EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*]" = ( + "synth_neon*", + "synth_stereo_neon*", + "dct64_neon*", + ); + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 4.3; + SDKROOT = iphoneos; + }; + name = Debug; + }; + CD132C1A152A48C200B4F5A8 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + COPY_PHASE_STRIP = YES; + EXCLUDED_SOURCE_FILE_NAMES = ""; + "EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*]" = ( + "synth_neon*", + "synth_stereo_neon*", + "dct64_neon*", + ); + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 4.3; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + CD132C1C152A48C200B4F5A8 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + DSTROOT = /tmp/libmpg123.dst; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + CD132C1D152A48C200B4F5A8 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + DSTROOT = /tmp/libmpg123.dst; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Release; + }; + CD6D72D2152B748200CF4285 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + EXECUTABLE_PREFIX = lib; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)"; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + }; + name = Debug; + }; + CD6D72D3152B748200CF4285 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + EXECUTABLE_PREFIX = lib; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + CD132C08152A48C100B4F5A8 /* Build configuration list for PBXProject "mpg123" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + CD132C19152A48C200B4F5A8 /* Debug */, + CD132C1A152A48C200B4F5A8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + CD132C1B152A48C200B4F5A8 /* Build configuration list for PBXNativeTarget "mpg123-ios" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + CD132C1C152A48C200B4F5A8 /* Debug */, + CD132C1D152A48C200B4F5A8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + CD6D72D4152B748200CF4285 /* Build configuration list for PBXNativeTarget "mpg123-mac" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + CD6D72D2152B748200CF4285 /* Debug */, + CD6D72D3152B748200CF4285 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = CD132C05152A48C100B4F5A8 /* Project object */; +} diff --git a/deps/mpg123/ports/mpg123_.pas b/deps/mpg123/ports/mpg123_.pas new file mode 100644 index 0000000..5eea80b --- /dev/null +++ b/deps/mpg123/ports/mpg123_.pas @@ -0,0 +1,478 @@ +unit mpg123_; +interface + +uses + Windows, + SysUtils; + + // INITIAL CONVERSION BY ARTHUR 17/02/2008 + // USE http://www.mpg123.de/api/ FOR DOCUMENTATION SINCE I STRIPED ALL THE COMMENTS FROM THE UNIT + +type + PDWord = ^DWORD; + PPbyte = ^PByte; + PPchar = ^PChar; + Pdouble = ^double; + PPlongint = ^Plongint; + off_t = Longint; + Poff_t = ^off_t; + PPoff_T = ^Poff_t; + size_t = Cardinal; + Psize_t = ^size_t; + +type + Pmpg123_handle_struct = ^Tmpg123_handle_struct; + Tmpg123_handle_struct = packed record + {undefined structure} + end; + + Tmpg123_handle = Tmpg123_handle_struct; + Pmpg123_handle = ^Tmpg123_handle; + +var + mpg123_init: function: Longint; cdecl; + + mpg123_exit: procedure; cdecl; + + mpg123_new: function(decoder: PChar; Error: Plongint): Pmpg123_handle; cdecl; + + mpg123_delete: procedure(mh: Pmpg123_handle); cdecl; + +type + Tmpg123_parms = Longint; +const + MPG123_VERBOSE = 0; + MPG123_FLAGS = 1; + MPG123_ADD_FLAGS = 2; + MPG123_FORCE_RATE = 3; + MPG123_DOWN_SAMPLE = 4; + MPG123_RVA = 5; + MPG123_DOWNSPEED = 6; + MPG123_UPSPEED = 7; + MPG123_START_FRAME = 8; + MPG123_DECODE_FRAMES = 9; + MPG123_ICY_INTERVAL = 10; + MPG123_OUTSCALE = 11; + MPG123_TIMEOUT = 12; + MPG123_REMOVE_FLAGS = 13; + MPG123_RESYNC_LIMIT = 14; + +type + Tmpg123_param_flags = Longint; +const + MPG123_FORCE_MONO = $7; + MPG123_MONO_LEFT = $1; + MPG123_MONO_RIGHT = $2; + MPG123_MONO_MIX = $4; + MPG123_FORCE_STEREO = $8; + MPG123_FORCE_8BIT = $10; + MPG123_QUIET = $20; + MPG123_GAPLESS = $40; + MPG123_NO_RESYNC = $80; + +type + Tmpg123_param_rva = Longint; +const + MPG123_RVA_OFF = 0; + MPG123_RVA_MIX = 1; + MPG123_RVA_ALBUM = 2; + MPG123_RVA_MAX = MPG123_RVA_ALBUM; + +var + mpg123_param: function(mh: Pmpg123_handle; _type: Tmpg123_parms; value: Longint; fvalue: double): Longint; cdecl; + + mpg123_getparam: function(mh: Pmpg123_handle; _type: Tmpg123_parms; val: Plongint; fval: Pdouble): Longint; cdecl; + +type + Tmpg123_errors = Longint; +const + MPG123_DONE = -(12); + MPG123_NEW_FORMAT = -(11); + MPG123_NEED_MORE = -(10); + MPG123_ERR = -(1); + MPG123_OK = 0; + MPG123_BAD_OUTFORMAT = 1; + MPG123_BAD_CHANNEL = 2; + MPG123_BAD_RATE = 3; + MPG123_ERR_16TO8TABLE = 4; + MPG123_BAD_PARAM = 5; + MPG123_BAD_BUFFER = 6; + MPG123_OUT_OF_MEM = 7; + MPG123_NOT_INITIALIZED = 8; + MPG123_BAD_DECODER = 9; + MPG123_BAD_HANDLE = 10; + MPG123_NO_BUFFERS = 11; + MPG123_BAD_RVA = 12; + MPG123_NO_GAPLESS = 13; + MPG123_NO_SPACE = 14; + MPG123_BAD_TYPES = 15; + MPG123_BAD_BAND = 16; + MPG123_ERR_NULL = 17; + MPG123_ERR_READER = 18; + MPG123_NO_SEEK_FROM_END = 19; + MPG123_BAD_WHENCE = 20; + MPG123_NO_TIMEOUT = 21; + MPG123_BAD_FILE = 22; + MPG123_NO_SEEK = 23; + MPG123_NO_READER = 24; + MPG123_BAD_PARS = 25; + MPG123_BAD_INDEX_PAR = 26; + MPG123_OUT_OF_SYNC = 27; + MPG123_RESYNC_FAIL = 28; + +var + mpg123_plain_strerror: function(errcode: Longint): PChar; cdecl; + + mpg123_strerror: function(mh: Pmpg123_handle): PChar; cdecl; + + mpg123_errcode: function(mh: Pmpg123_handle): Longint; cdecl; + + mpg123_decoders: function: PPchar; cdecl; + + mpg123_supported_decoders: function: PPchar; cdecl; + + mpg123_decoder: function(mh: Pmpg123_handle; decoder_name: PChar): Longint; cdecl; + +type + Tmpg123_enc_enum = Longint; +const + MPG123_ENC_16 = $40; + MPG123_ENC_SIGNED = $80; + MPG123_ENC_8 = $0F; + MPG123_ENC_SIGNED_16 = (MPG123_ENC_16 or MPG123_ENC_SIGNED) or $10; + MPG123_ENC_UNSIGNED_16 = MPG123_ENC_16 or $20; + MPG123_ENC_UNSIGNED_8 = $01; + MPG123_ENC_SIGNED_8 = MPG123_ENC_SIGNED or $02; + MPG123_ENC_ULAW_8 = $04; + MPG123_ENC_ALAW_8 = $08; + MPG123_ENC_ANY = ((((MPG123_ENC_SIGNED_16 or MPG123_ENC_UNSIGNED_16) or MPG123_ENC_UNSIGNED_8) or MPG123_ENC_SIGNED_8) or MPG123_ENC_ULAW_8) or MPG123_ENC_ALAW_8; + +type + Tmpg123_channelcount = Longint; +const + MPG123_MONO = 1; + MPG123_STEREO = 2; + +var + mpg123_rates: procedure(list: PPlongint; number: Psize_t); cdecl; + + mpg123_encodings: procedure(list: PPlongint; number: Psize_t); cdecl; + + mpg123_format_none: function(mh: Pmpg123_handle): Longint; cdecl; + + mpg123_format_all: function(mh: Pmpg123_handle): Longint; cdecl; + + mpg123_format: function(mh: Pmpg123_handle; rate: Longint; channels: Longint; encodings: Longint): Longint; cdecl; + + mpg123_format_support: function(mh: Pmpg123_handle; rate: Longint; encoding: Longint): Longint; cdecl; + + mpg123_getformat: function(mh: Pmpg123_handle; rate: Plongint; channels: Plongint; encoding: Plongint): Longint; cdecl; + + mpg123_open: function(mh: Pmpg123_handle; path: PChar): Longint; cdecl; + + mpg123_open_fd: function(mh: Pmpg123_handle; fd: Longint): Longint; cdecl; + + mpg123_open_feed: function(mh: Pmpg123_handle): Longint; cdecl; + + mpg123_close: function(mh: Pmpg123_handle): Longint; cdecl; + + mpg123_read: function(mh: Pmpg123_handle; outmemory: PByte; outmemsize: size_t; done: Psize_t): Longint; cdecl; + + mpg123_decode: function(mh: Pmpg123_handle; inmemory: PByte; inmemsize: size_t; outmemory: PByte; outmemsize: size_t; + done: Psize_t): Longint; cdecl; + + mpg123_decode_frame: function(mh: Pmpg123_handle; num: Poff_t; audio: PPbyte; bytes: Psize_t): Longint; cdecl; + + mpg123_tell: function(mh: Pmpg123_handle): off_t; cdecl; + + mpg123_tellframe: function(mh: Pmpg123_handle): off_t; cdecl; + + mpg123_seek: function(mh: Pmpg123_handle; sampleoff: off_t; whence: Longint): off_t; cdecl; + + mpg123_feedseek: function(mh: Pmpg123_handle; sampleoff: off_t; whence: Longint; input_offset: Poff_t): off_t; cdecl; + + mpg123_seek_frame: function(mh: Pmpg123_handle; frameoff: off_t; whence: Longint): off_t; cdecl; + + mpg123_timeframe: function(mh: Pmpg123_handle; sec: double): off_t; cdecl; + + mpg123_index: function(mh: Pmpg123_handle; offsets: PPoff_t; step: Poff_t; fill: Psize_t): Longint; cdecl; + + mpg123_position: function(mh: Pmpg123_handle; frame_offset: off_t; buffered_bytes: off_t; current_frame: Poff_t; frames_left: Poff_t; + current_seconds: Pdouble; seconds_left: Pdouble): Longint; cdecl; + +type + Tmpg123_channels = Longint; +const + MPG123_LEFT = $1; + MPG123_RIGHT = $2; + +var + mpg123_eq: function(mh: Pmpg123_handle; channel: Tmpg123_channels; band: Longint; val: double): Longint; cdecl; + + mpg123_reset_eq: function(mh: Pmpg123_handle): Longint; cdecl; + + mpg123_volume: function(mh: Pmpg123_handle; vol: double): Longint; cdecl; + + mpg123_volume_change: function(mh: Pmpg123_handle; change: double): Longint; cdecl; + + mpg123_getvolume: function(mh: Pmpg123_handle; base: Pdouble; really: Pdouble; rva_db: Pdouble): Longint; cdecl; + +type + Tmpg123_vbr = Longint; +const + MPG123_CBR = 0; + MPG123_VBR = 1; + MPG123_ABR = 2; + +type + Tmpg123_version = Longint; +const + MPG123_1_0 = 0; + MPG123_2_0 = 1; + MPG123_2_5 = 2; + +type + Tmpg123_mode = Longint; +const + MPG123_M_STEREO = 0; + MPG123_M_JOINT = 1; + MPG123_M_DUAL = 2; + MPG123_M_MONO = 3; + +type + Tmpg123_flags = Longint; +const + MPG123_CRC = $1; + MPG123_COPYRIGHT = $2; + MPG123_PRIVATE = $4; + MPG123_ORIGINAL = $8; + +type + Pmpg123_frameinfo = ^Tmpg123_frameinfo; + Tmpg123_frameinfo = packed record + version: Tmpg123_version; + layer: Longint; + rate: Longint; + mode: Tmpg123_mode; + mode_ext: Longint; + framesize: Longint; + Flags: Tmpg123_flags; + emphasis: Longint; + bitrate: Longint; + abr_rate: Longint; + vbr: Tmpg123_vbr; + end; + +var + mpg123_info: function(mh: Pmpg123_handle; mi: Pmpg123_frameinfo): Longint; cdecl; + + mpg123_safe_buffer: function: size_t; cdecl; + + mpg123_scan: function(mh: Pmpg123_handle): Longint; cdecl; + + mpg123_length: function(mh: Pmpg123_handle): off_t; cdecl; + + mpg123_tpf: function(mh: Pmpg123_handle): double; cdecl; + + mpg123_clip: function(mh: Pmpg123_handle): Longint; cdecl; + +type + + Pmpg123_string = ^Tmpg123_string; + Tmpg123_string = packed record + p: PChar; + Size: size_t; + fill: size_t; + end; + +var + mpg123_init_string: procedure(sb: Pmpg123_string); cdecl; + + mpg123_free_string: procedure(sb: Pmpg123_string); cdecl; + + mpg123_resize_string: function(sb: Pmpg123_string; news: size_t): Longint; cdecl; + + mpg123_copy_string: function(from: Pmpg123_string; _to: Pmpg123_string): Longint; cdecl; + + mpg123_add_string: function(sb: Pmpg123_string; stuff: PChar): Longint; cdecl; + + mpg123_set_string: function(sb: Pmpg123_string; stuff: PChar): Longint; cdecl; + +type + + Pmpg123_text = ^Tmpg123_text; + Tmpg123_text = packed record + lang: array[0..2] of Char; + id: array[0..3] of Char; + description: Tmpg123_string; + Text: Tmpg123_string; + end; + + PPmpg123_id3v2 = ^Pmpg123_id3v2; + Pmpg123_id3v2 = ^Tmpg123_id3v2; + Tmpg123_id3v2 = packed record + version: Byte; + title: Pmpg123_string; + artist: Pmpg123_string; + album: Pmpg123_string; + year: Pmpg123_string; + genre: Pmpg123_string; + comment: Pmpg123_string; + comment_list: Pmpg123_text; + comments: size_t; + Text: Pmpg123_text; + texts: size_t; + extra: Pmpg123_text; + extras: size_t; + end; + + PPmpg123_id3v1 = ^Pmpg123_id3v1; + Pmpg123_id3v1 = ^Tmpg123_id3v1; + Tmpg123_id3v1 = packed record + tag: array[0..2] of Char; + title: array[0..29] of Char; + artist: array[0..29] of Char; + album: array[0..29] of Char; + year: array[0..3] of Char; + comment: array[0..29] of Char; + genre: Byte; + end; + +const + MPG123_ID3 = $3; + + MPG123_NEW_ID3 = $1; + + MPG123_ICY = $C; + + MPG123_NEW_ICY = $4; + +var + mpg123_meta_check: function(mh: Pmpg123_handle): Longint; cdecl; + + mpg123_id3_: function(mh: Pmpg123_handle; var v1: Pmpg123_id3v1; var v2: Pmpg123_id3v2): Longint; cdecl; + + mpg123_icy_: function(mh: Pmpg123_handle; icy_meta: PPchar): Longint; cdecl; + +type + Pmpg123_pars_struct = ^Tmpg123_pars_struct; + Tmpg123_pars_struct = packed record + {undefined structure} + end; + + Tmpg123_pars = Tmpg123_pars_struct; + Pmpg123_pars = ^Tmpg123_pars; + +var + mpg123_parnew: function(mp: Pmpg123_pars; decoder: PChar; Error: Plongint): Pmpg123_handle; cdecl; + + mpg123_new_pars: function(Error: Plongint): Pmpg123_pars; cdecl; + + mpg123_delete_pars: procedure(mp: Pmpg123_pars); cdecl; + + mpg123_fmt_none: function(mp: Pmpg123_pars): Longint; cdecl; + + mpg123_fmt_all: function(mp: Pmpg123_pars): Longint; cdecl; + + mpg123_fmt: function(mh: Pmpg123_pars; rate: Longint; channels: Longint; encodings: Longint): Longint; cdecl; + + mpg123_fmt_support: function(mh: Pmpg123_pars; rate: Longint; encoding: Longint): Longint; cdecl; + + mpg123_par: function(mp: Pmpg123_pars; _type: Tmpg123_parms; value: Longint; fvalue: double): Longint; cdecl; + + mpg123_getpar: function(mp: Pmpg123_pars; _type: Tmpg123_parms; val: Plongint; fval: Pdouble): Longint; cdecl; + + mpg123_replace_buffer: function(mh: Pmpg123_handle; data: PByte; Size: size_t): Longint; cdecl; + + mpg123_outblock: function(mh: Pmpg123_handle): size_t; cdecl; + + //mpg123_replace_reader : function(mh:Pmpg123_handle; r_read:function (_para1:longint; _para2:pointer; _para3:size_t):Tssize_t; r_lseek:function (_para1:longint; _para2:off_t; _para3:longint):off_t):longint; + +implementation + +var + hlib: THandle; + +procedure Freempg123; +begin + FreeLibrary(hlib); +end; + +procedure Loadmpg123(lib: PChar); +begin + hlib := LoadLibrary(lib); + mpg123_init := GetProcAddress(hlib, 'mpg123_init'); + mpg123_exit := GetProcAddress(hlib, 'mpg123_exit'); + mpg123_new := GetProcAddress(hlib, 'mpg123_new'); + mpg123_delete := GetProcAddress(hlib, 'mpg123_delete'); + mpg123_param := GetProcAddress(hlib, 'mpg123_param'); + mpg123_getparam := GetProcAddress(hlib, 'mpg123_getparam'); + mpg123_plain_strerror := GetProcAddress(hlib, 'mpg123_plain_strerror'); + mpg123_strerror := GetProcAddress(hlib, 'mpg123_strerror'); + mpg123_errcode := GetProcAddress(hlib, 'mpg123_errcode'); + mpg123_decoders := GetProcAddress(hlib, 'mpg123_decoders'); + mpg123_supported_decoders := GetProcAddress(hlib, 'mpg123_supported_decoders'); + mpg123_decoder := GetProcAddress(hlib, 'mpg123_decoder'); + mpg123_rates := GetProcAddress(hlib, 'mpg123_rates'); + mpg123_encodings := GetProcAddress(hlib, 'mpg123_encodings'); + mpg123_format_none := GetProcAddress(hlib, 'mpg123_format_none'); + mpg123_format_all := GetProcAddress(hlib, 'mpg123_format_all'); + mpg123_format := GetProcAddress(hlib, 'mpg123_format'); + mpg123_format_support := GetProcAddress(hlib, 'mpg123_format_support'); + mpg123_getformat := GetProcAddress(hlib, 'mpg123_getformat'); + mpg123_open := GetProcAddress(hlib, 'mpg123_open'); + mpg123_open_fd := GetProcAddress(hlib, 'mpg123_open_fd'); + mpg123_open_feed := GetProcAddress(hlib, 'mpg123_open_feed'); + mpg123_close := GetProcAddress(hlib, 'mpg123_close'); + mpg123_read := GetProcAddress(hlib, 'mpg123_read'); + mpg123_decode := GetProcAddress(hlib, 'mpg123_decode'); + mpg123_decode_frame := GetProcAddress(hlib, 'mpg123_decode_frame'); + mpg123_tell := GetProcAddress(hlib, 'mpg123_tell'); + mpg123_tellframe := GetProcAddress(hlib, 'mpg123_tellframe'); + mpg123_seek := GetProcAddress(hlib, 'mpg123_seek'); + mpg123_feedseek := GetProcAddress(hlib, 'mpg123_feedseek'); + mpg123_seek_frame := GetProcAddress(hlib, 'mpg123_seek_frame'); + mpg123_timeframe := GetProcAddress(hlib, 'mpg123_timeframe'); + mpg123_index := GetProcAddress(hlib, 'mpg123_index'); + mpg123_position := GetProcAddress(hlib, 'mpg123_position'); + mpg123_eq := GetProcAddress(hlib, 'mpg123_eq'); + mpg123_reset_eq := GetProcAddress(hlib, 'mpg123_reset_eq'); + mpg123_volume := GetProcAddress(hlib, 'mpg123_volume'); + mpg123_volume_change := GetProcAddress(hlib, 'mpg123_volume_change'); + mpg123_getvolume := GetProcAddress(hlib, 'mpg123_getvolume'); + mpg123_info := GetProcAddress(hlib, 'mpg123_info'); + mpg123_safe_buffer := GetProcAddress(hlib, 'mpg123_safe_buffer'); + mpg123_scan := GetProcAddress(hlib, 'mpg123_scan'); + mpg123_length := GetProcAddress(hlib, 'mpg123_length'); + mpg123_tpf := GetProcAddress(hlib, 'mpg123_tpf'); + mpg123_clip := GetProcAddress(hlib, 'mpg123_clip'); + mpg123_init_string := GetProcAddress(hlib, 'mpg123_init_string'); + mpg123_free_string := GetProcAddress(hlib, 'mpg123_free_string'); + mpg123_resize_string := GetProcAddress(hlib, 'mpg123_resize_string'); + mpg123_copy_string := GetProcAddress(hlib, 'mpg123_copy_string'); + mpg123_add_string := GetProcAddress(hlib, 'mpg123_add_string'); + mpg123_set_string := GetProcAddress(hlib, 'mpg123_set_string'); + mpg123_meta_check := GetProcAddress(hlib, 'mpg123_meta_check'); + mpg123_id3_ := GetProcAddress(hlib, 'mpg123_id3'); + mpg123_icy_ := GetProcAddress(hlib, 'mpg123_icy'); + mpg123_parnew := GetProcAddress(hlib, 'mpg123_parnew'); + mpg123_new_pars := GetProcAddress(hlib, 'mpg123_new_pars'); + mpg123_delete_pars := GetProcAddress(hlib, 'mpg123_delete_pars'); + mpg123_fmt_none := GetProcAddress(hlib, 'mpg123_fmt_none'); + mpg123_fmt_all := GetProcAddress(hlib, 'mpg123_fmt_all'); + mpg123_fmt := GetProcAddress(hlib, 'mpg123_fmt'); + mpg123_fmt_support := GetProcAddress(hlib, 'mpg123_fmt_support'); + mpg123_par := GetProcAddress(hlib, 'mpg123_par'); + mpg123_getpar := GetProcAddress(hlib, 'mpg123_getpar'); + mpg123_replace_buffer := GetProcAddress(hlib, 'mpg123_replace_buffer'); + mpg123_outblock := GetProcAddress(hlib, 'mpg123_outblock'); + //mpg123_replace_reader := GetProcAddress(hlib,'mpg123_replace_reader'); +end; + +initialization + Loadmpg123('libmpg123-0.dll'); +finalization + Freempg123; + +end. + diff --git a/deps/mpg123/scripts/benchmark-cpu.pl b/deps/mpg123/scripts/benchmark-cpu.pl new file mode 100755 index 0000000..b9d3e04 --- /dev/null +++ b/deps/mpg123/scripts/benchmark-cpu.pl @@ -0,0 +1,56 @@ +#!/usr/bin/perl +# +# benchmark-cpu.pl: benchmark CPU optimizations of mpg123 +# +# initially written by Nicholas J Humfrey , placed in the public domain +# + +use strict; +#use Time::HiRes qw/time/; + +my $MPG123_CMD = shift @ARGV; +my @TEST_FILES = @ARGV; + +die "Please specify full path to mpg123 >= 1.7.0 and a test MP3 file to decode" if (scalar(@ARGV) < 1); +die "mpg123 command does not exist" unless (-e $MPG123_CMD); +die "mpg123 command is not executable" unless (-x $MPG123_CMD); +for(@TEST_FILES) +{ + die "test MP3 file does not exist" unless (-e $_); +} + +# Force unbuffed output on STDOUT +#$|=1; # why? + +# Check the CPUs available +my $cpulist = `$MPG123_CMD --test-cpu`; +chomp( $cpulist ); +die "Failed to get list of available CPU optimizations" unless ($cpulist =~ s/^Supported decoders: //); + +my @cpus = split( / /, $cpulist ); +my @encs = qw(s16 f32); + +printf STDERR ("Found %d CPU optimizations to test...\n\n", scalar(@cpus) ); + +print "#mpg123 benchmark (user CPU time in seconds for decoding)\n"; +print "#decoder"; +for(@encs){ print " t_$_/s"; } +print "\n"; + +foreach my $cpu (@cpus) +{ + print "$cpu"; + foreach my $e (@encs) + { + # using user CPU time + my @start_time = times(); + system($MPG123_CMD, '-q', '--cpu', $cpu, '-e', $e, '-t', @TEST_FILES ); + my @end_time = times(); + + # third entry is child user time + printf(" %4.2f", $end_time[2] - $start_time[2]); + } + print("\n"); +} + + diff --git a/deps/mpg123/scripts/tag_lyrics.py b/deps/mpg123/scripts/tag_lyrics.py new file mode 100644 index 0000000..1feb081 --- /dev/null +++ b/deps/mpg123/scripts/tag_lyrics.py @@ -0,0 +1,76 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# needs mutagen +# grabbed from: http://code.activestate.com/recipes/577138-embed-lyrics-into-mp3-files-using-mutagen-uslt-tag/ +# simplified to only work on one file and get lyrics from stdin +# I suspect this is public domain code. Just a usage example of the mutagen lib. + +import os +import sys +import codecs +from mutagen.mp3 import MP3 +from mutagen.id3 import ID3NoHeaderError +from mutagen.id3 import ID3, USLT + +TEXT_ENCODING = 'utf8' +TEXT_LANG = 'XXX' +TEXT_DESC = '' + +# get workdir from first arg or use current dir +if (len(sys.argv) > 1): + fname = sys.argv[1] + print "fname=" + fname +else: + print 'Give me at least a file name to work on, plus the lyrics from stdin' + print 'Optionally, you can provide the language (3 lowercase letters) of the lyrics and a description' + sys.exit() + +if (len(sys.argv) > 2): + TEXT_LANG = sys.argv[2] + +if (len(sys.argv) > 3): + TEXT_DESC = sys.argv[3] + +print "reading lyrics from standard input ..." + +lyrics = sys.stdin.read().strip() + +# try to find the right encoding +for enc in ('utf8','iso-8859-1','iso-8859-15','cp1252','cp1251','latin1'): + try: + lyrics = lyrics.decode(enc) + TEXT_DESC = TEXT_DESC.decode(enc) + print enc, + break + except: + pass + +print "Adding lyrics to " + fname +print "Language: " + TEXT_LANG +print "Description: " + TEXT_DESC + +# create ID3 tag if not exists +try: + tags = ID3(fname) +except ID3NoHeaderError: + print "Adding ID3 header;", + tags = ID3() + +# remove old unsychronized lyrics +if len(tags.getall(u"USLT::'"+TEXT_LANG+"'")) != 0: + print "Removing Lyrics." + tags.delall(u"USLT::'"+TEXT_LANG+"'") + #tags.save(fname) # hm, why? + +#tags.add(USLT(encoding=3, lang=u'eng', desc=u'desc', text=lyrics)) +# apparently the description is important when more than one +# USLT frames are present +#tags[u"USLT::'eng'"] = (USLT(encoding=3, lang=u'eng', desc=u'desc', text=lyrics)) +tags[u"USLT::'"+TEXT_LANG+"'"] = (USLT(encoding=3, lang=TEXT_LANG, desc=TEXT_DESC, text=lyrics)) +print 'Added USLT frame to', fname + +tags.save(fname) + +print 'Done' + diff --git a/deps/mpg123/src/Makefile.am b/deps/mpg123/src/Makefile.am new file mode 100644 index 0000000..242a9f0 --- /dev/null +++ b/deps/mpg123/src/Makefile.am @@ -0,0 +1,186 @@ +## Makefile.am: produce Makefile.in from this + +## copyright by the mpg123 project - free software under the terms of the LGPL 2.1 +## see COPYING and AUTHORS files in distribution or http://mpg123.org +## initially written by Nicholas J. Humfrey + +AM_CPPFLAGS = -DPKGLIBDIR="\"$(pkglibdir)\"" +mpg123_LDADD = $(LIBLTDL) libmpg123/libmpg123.la @MODULE_OBJ@ @OUTPUT_OBJ@ @OUTPUT_LIBS@ +mpg123_LDFLAGS = @EXEC_LT_LDFLAGS@ @OUTPUT_LDFLAGS@ +# Just mpg123_INCLUDES has no effect on build! Trying that before reverting to AM_CPPFLAGS. +INCLUDES = $(LTDLINCL) -I$(top_builddir)/src/libmpg123 -I$(top_srcdir)/src/libmpg123 +# libltdl is not mentioned here... it's not that trivial +mpg123_DEPENDENCIES = @OUTPUT_OBJ@ @MODULE_OBJ@ libmpg123/libmpg123.la + +SUBDIRS = output libmpg123 +EXTRA_DIST = legacy_module.c module.c sfifo.c sfifo.h + + +CLEANFILES = *.a + +bin_PROGRAMS = mpg123 + +EXTRA_PROGRAMS = tests/seek_accuracy tests/seek_whence tests/noise tests/text tests/plain_id3 + +mpg123_SOURCES = \ + audio.c \ + audio.h \ + buffer.c \ + buffer.h \ + common.c \ + common.h \ + libmpg123/compat.c \ + libmpg123/compat.h \ + control_generic.c \ + equalizer.c \ + getlopt.c \ + getlopt.h \ + httpget.c \ + httpget.h \ + resolver.c \ + resolver.h \ + genre.h \ + genre.c \ + module.h \ + mpg123.c \ + mpg123app.h \ + metaprint.c \ + metaprint.h \ + local.h \ + local.c \ + playlist.c \ + playlist.h \ + streamdump.h \ + streamdump.c \ + term.c \ + term.h \ + wav.c \ + win32_support.h \ + wavhead.h \ + xfermem.c \ + xfermem.h + +if WIN32_CODES +mpg123_SOURCES += \ + win32_support.c \ + win32_net.c +endif + +# That is not nice... but it is how I manage to get the dependency on output/alsa.o without error about .deps/output/alsa.Tpo . +# Did I mention that recursive make sucks? +# `%'-style pattern rules are a GNU make extension +#find output/ -name '*.c' | perl -ne 'chomp; $mod=$_; $mod=~s/\.c$/.\$(OBJEXT)/; +#print "$mod: $_ audio.h module.h\n"; +#print "\tcd output && \$(MAKE)\n\n";' + +output/coreaudio.$(OBJEXT): output/coreaudio.c audio.h module.h + cd output && $(MAKE) + +output/win32.$(OBJEXT): output/win32.c audio.h module.h + cd output && $(MAKE) + +output/alsa05.$(OBJEXT): output/alsa05.c audio.h module.h + cd output && $(MAKE) + +output/sdl.$(OBJEXT): output/sdl.c audio.h module.h + cd output && $(MAKE) + +output/dummy.$(OBJEXT): output/dummy.c audio.h module.h + cd output && $(MAKE) + +output/alib.$(OBJEXT): output/alib.c audio.h module.h + cd output && $(MAKE) + +output/libao.$(OBJEXT): output/libao.c audio.h module.h + cd output && $(MAKE) + +output/sun.$(OBJEXT): output/sun.c audio.h module.h + cd output && $(MAKE) + +output/aix.$(OBJEXT): output/aix.c audio.h module.h + cd output && $(MAKE) + +output/oss.$(OBJEXT): output/oss.c audio.h module.h + cd output && $(MAKE) + +output/mint.$(OBJEXT): output/mint.c audio.h module.h + cd output && $(MAKE) + +output/pulse.$(OBJEXT): output/pulse.c audio.h module.h + cd output && $(MAKE) + +output/jack.$(OBJEXT): output/jack.c audio.h module.h + cd output && $(MAKE) + +output/os2.$(OBJEXT): output/os2.c audio.h module.h + cd output && $(MAKE) + +output/nas.$(OBJEXT): output/nas.c audio.h module.h + cd output && $(MAKE) + +output/sgi.$(OBJEXT): output/sgi.c audio.h module.h + cd output && $(MAKE) + +output/portaudio.$(OBJEXT): output/portaudio.c audio.h module.h + cd output && $(MAKE) + +output/arts.$(OBJEXT): output/arts.c audio.h module.h + cd output && $(MAKE) + +output/esd.$(OBJEXT): output/esd.c audio.h module.h + cd output && $(MAKE) + +output/alsa.$(OBJEXT): output/alsa.c audio.h module.h + cd output && $(MAKE) + +output/hp.$(OBJEXT): output/hp.c audio.h module.h + cd output && $(MAKE) + +output/sndio.$(OBJEXT): output/sndio.c audio.h module.h + cd output && $(MAKE) + + +# Would have to mention _all_ source files... Dammit, that's what the libmpg123/Makefile.am does! +# But again, the a make $something here needs that stupid rule... WHY??? +libmpg123/libmpg123.la: config.h libmpg123/mpg123.h + cd libmpg123 && $(MAKE) + +tests_seek_accuracy_SOURCES = \ +tests/seek_accuracy.c \ +libmpg123/compat.h \ +libmpg123/compat.c + +tests_seek_accuracy_DEPENDENCIES = libmpg123/libmpg123.la +tests_seek_accuracy_LDADD = libmpg123/libmpg123.la + +tests_seek_whence_SOURCES = \ +tests/seek_whence.c \ +libmpg123/compat.h \ +libmpg123/compat.c + +tests_seek_whence_DEPENDENCIES = libmpg123/libmpg123.la +tests_seek_whence_LDADD = libmpg123/libmpg123.la + +tests_noise_SOURCES = \ +tests/noise.c \ +libmpg123/compat.h \ +libmpg123/compat.c \ +libmpg123/dither.h \ +libmpg123/dither.c + +tests_text_SOURCES = \ +tests/text.c \ +tests/testtext.h \ +libmpg123/compat.h \ +libmpg123/compat.c + +tests_text_DEPENDENCIES = libmpg123/libmpg123.la +tests_text_LDADD = libmpg123/libmpg123.la + +tests_plain_id3_SOURCES = \ +tests/plain_id3.c \ +libmpg123/compat.h \ +libmpg123/compat.c + +tests_plain_id3_DEPENDENCIES = libmpg123/libmpg123.la +tests_plain_id3_LDADD = libmpg123/libmpg123.la diff --git a/deps/mpg123/src/Makefile.in b/deps/mpg123/src/Makefile.in new file mode 100644 index 0000000..1ea7495 --- /dev/null +++ b/deps/mpg123/src/Makefile.in @@ -0,0 +1,1097 @@ +# Makefile.in generated by automake 1.12.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = mpg123$(EXEEXT) +EXTRA_PROGRAMS = tests/seek_accuracy$(EXEEXT) \ + tests/seek_whence$(EXEEXT) tests/noise$(EXEEXT) \ + tests/text$(EXEEXT) tests/plain_id3$(EXEEXT) +@WIN32_CODES_TRUE@am__append_1 = \ +@WIN32_CODES_TRUE@ win32_support.c \ +@WIN32_CODES_TRUE@ win32_net.c + +subdir = src +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/config.h.in $(top_srcdir)/build/depcomp +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/addrconfig.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am__mpg123_SOURCES_DIST = audio.c audio.h buffer.c buffer.h common.c \ + common.h libmpg123/compat.c libmpg123/compat.h \ + control_generic.c equalizer.c getlopt.c getlopt.h httpget.c \ + httpget.h resolver.c resolver.h genre.h genre.c module.h \ + mpg123.c mpg123app.h metaprint.c metaprint.h local.h local.c \ + playlist.c playlist.h streamdump.h streamdump.c term.c term.h \ + wav.c win32_support.h wavhead.h xfermem.c xfermem.h \ + win32_support.c win32_net.c +@WIN32_CODES_TRUE@am__objects_1 = win32_support.$(OBJEXT) \ +@WIN32_CODES_TRUE@ win32_net.$(OBJEXT) +am_mpg123_OBJECTS = audio.$(OBJEXT) buffer.$(OBJEXT) common.$(OBJEXT) \ + compat.$(OBJEXT) control_generic.$(OBJEXT) equalizer.$(OBJEXT) \ + getlopt.$(OBJEXT) httpget.$(OBJEXT) resolver.$(OBJEXT) \ + genre.$(OBJEXT) mpg123.$(OBJEXT) metaprint.$(OBJEXT) \ + local.$(OBJEXT) playlist.$(OBJEXT) streamdump.$(OBJEXT) \ + term.$(OBJEXT) wav.$(OBJEXT) xfermem.$(OBJEXT) \ + $(am__objects_1) +mpg123_OBJECTS = $(am_mpg123_OBJECTS) +mpg123_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(mpg123_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_tests_noise_OBJECTS = noise.$(OBJEXT) compat.$(OBJEXT) \ + dither.$(OBJEXT) +tests_noise_OBJECTS = $(am_tests_noise_OBJECTS) +tests_noise_LDADD = $(LDADD) +am__dirstamp = $(am__leading_dot)dirstamp +am_tests_plain_id3_OBJECTS = plain_id3.$(OBJEXT) compat.$(OBJEXT) +tests_plain_id3_OBJECTS = $(am_tests_plain_id3_OBJECTS) +am_tests_seek_accuracy_OBJECTS = seek_accuracy.$(OBJEXT) \ + compat.$(OBJEXT) +tests_seek_accuracy_OBJECTS = $(am_tests_seek_accuracy_OBJECTS) +am_tests_seek_whence_OBJECTS = seek_whence.$(OBJEXT) compat.$(OBJEXT) +tests_seek_whence_OBJECTS = $(am_tests_seek_whence_OBJECTS) +am_tests_text_OBJECTS = text.$(OBJEXT) compat.$(OBJEXT) +tests_text_OBJECTS = $(am_tests_text_OBJECTS) +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/build/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(mpg123_SOURCES) $(tests_noise_SOURCES) \ + $(tests_plain_id3_SOURCES) $(tests_seek_accuracy_SOURCES) \ + $(tests_seek_whence_SOURCES) $(tests_text_SOURCES) +DIST_SOURCES = $(am__mpg123_SOURCES_DIST) $(tests_noise_SOURCES) \ + $(tests_plain_id3_SOURCES) $(tests_seek_accuracy_SOURCES) \ + $(tests_seek_whence_SOURCES) $(tests_text_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AIX_CFLAGS = @AIX_CFLAGS@ +AIX_LDFLAGS = @AIX_LDFLAGS@ +AIX_LIBS = @AIX_LIBS@ +ALIB_CFLAGS = @ALIB_CFLAGS@ +ALIB_LDFLAGS = @ALIB_LDFLAGS@ +ALIB_LIBS = @ALIB_LIBS@ +ALSA_CFLAGS = @ALSA_CFLAGS@ +ALSA_LDFLAGS = @ALSA_LDFLAGS@ +ALSA_LIBS = @ALSA_LIBS@ +AMTAR = @AMTAR@ +API_VERSION = @API_VERSION@ +AR = @AR@ +ARTS_CFLAGS = @ARTS_CFLAGS@ +ARTS_LDFLAGS = @ARTS_LDFLAGS@ +ARTS_LIBS = @ARTS_LIBS@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COREAUDIO_CFLAGS = @COREAUDIO_CFLAGS@ +COREAUDIO_LDFLAGS = @COREAUDIO_LDFLAGS@ +COREAUDIO_LIBS = @COREAUDIO_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DECODER_LOBJ = @DECODER_LOBJ@ +DECODER_OBJ = @DECODER_OBJ@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMMY_CFLAGS = @DUMMY_CFLAGS@ +DUMMY_LDFLAGS = @DUMMY_LDFLAGS@ +DUMMY_LIBS = @DUMMY_LIBS@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ESD_CFLAGS = @ESD_CFLAGS@ +ESD_LDFLAGS = @ESD_LDFLAGS@ +ESD_LIBS = @ESD_LIBS@ +EXEC_LT_LDFLAGS = @EXEC_LT_LDFLAGS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +HP_CFLAGS = @HP_CFLAGS@ +HP_LDFLAGS = @HP_LDFLAGS@ +HP_LIBS = @HP_LIBS@ +INCLUDE_STDIO_H = @INCLUDE_STDIO_H@ +INCLUDE_STDLIB_H = @INCLUDE_STDLIB_H@ +INCLUDE_SYS_TYPE_H = @INCLUDE_SYS_TYPE_H@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +JACK_CFLAGS = @JACK_CFLAGS@ +JACK_LDFLAGS = @JACK_LDFLAGS@ +JACK_LIBS = @JACK_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LFS_LOBJ = @LFS_LOBJ@ +LIBMPG123_VERSION = @LIBMPG123_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_LDFLAGS = @LT_LDFLAGS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MINT_CFLAGS = @MINT_CFLAGS@ +MINT_LDFLAGS = @MINT_LDFLAGS@ +MINT_LIBS = @MINT_LIBS@ +MKDIR_P = @MKDIR_P@ +MODULE_OBJ = @MODULE_OBJ@ +NAS_CFLAGS = @NAS_CFLAGS@ +NAS_LDFLAGS = @NAS_LDFLAGS@ +NAS_LIBS = @NAS_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENAL_CFLAGS = @OPENAL_CFLAGS@ +OPENAL_LDFLAGS = @OPENAL_LDFLAGS@ +OPENAL_LIBS = @OPENAL_LIBS@ +OS2_CFLAGS = @OS2_CFLAGS@ +OS2_LDFLAGS = @OS2_LDFLAGS@ +OS2_LIBS = @OS2_LIBS@ +OSS_CFLAGS = @OSS_CFLAGS@ +OSS_LDFLAGS = @OSS_LDFLAGS@ +OSS_LIBS = @OSS_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +OUTPUT_CFLAGS = @OUTPUT_CFLAGS@ +OUTPUT_LDFLAGS = @OUTPUT_LDFLAGS@ +OUTPUT_LIBS = @OUTPUT_LIBS@ +OUTPUT_MOD = @OUTPUT_MOD@ +OUTPUT_OBJ = @OUTPUT_OBJ@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PORTAUDIO_CFLAGS = @PORTAUDIO_CFLAGS@ +PORTAUDIO_LDFLAGS = @PORTAUDIO_LDFLAGS@ +PORTAUDIO_LIBS = @PORTAUDIO_LIBS@ +PULSE_CFLAGS = @PULSE_CFLAGS@ +PULSE_LDFLAGS = @PULSE_LDFLAGS@ +PULSE_LIBS = @PULSE_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LDFLAGS = @SDL_LDFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SGI_CFLAGS = @SGI_CFLAGS@ +SGI_LDFLAGS = @SGI_LDFLAGS@ +SGI_LIBS = @SGI_LIBS@ +SHELL = @SHELL@ +SNDIO_CFLAGS = @SNDIO_CFLAGS@ +SNDIO_LDFLAGS = @SNDIO_LDFLAGS@ +SNDIO_LIBS = @SNDIO_LIBS@ +STRIP = @STRIP@ +SUN_CFLAGS = @SUN_CFLAGS@ +SUN_LDFLAGS = @SUN_LDFLAGS@ +SUN_LIBS = @SUN_LIBS@ +VERSION = @VERSION@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_LDFLAGS = @WIN32_LDFLAGS@ +WIN32_LIBS = @WIN32_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_CPPFLAGS = -DPKGLIBDIR="\"$(pkglibdir)\"" +mpg123_LDADD = $(LIBLTDL) libmpg123/libmpg123.la @MODULE_OBJ@ @OUTPUT_OBJ@ @OUTPUT_LIBS@ +mpg123_LDFLAGS = @EXEC_LT_LDFLAGS@ @OUTPUT_LDFLAGS@ +# Just mpg123_INCLUDES has no effect on build! Trying that before reverting to AM_CPPFLAGS. +INCLUDES = $(LTDLINCL) -I$(top_builddir)/src/libmpg123 -I$(top_srcdir)/src/libmpg123 +# libltdl is not mentioned here... it's not that trivial +mpg123_DEPENDENCIES = @OUTPUT_OBJ@ @MODULE_OBJ@ libmpg123/libmpg123.la +SUBDIRS = output libmpg123 +EXTRA_DIST = legacy_module.c module.c sfifo.c sfifo.h +CLEANFILES = *.a +mpg123_SOURCES = audio.c audio.h buffer.c buffer.h common.c common.h \ + libmpg123/compat.c libmpg123/compat.h control_generic.c \ + equalizer.c getlopt.c getlopt.h httpget.c httpget.h resolver.c \ + resolver.h genre.h genre.c module.h mpg123.c mpg123app.h \ + metaprint.c metaprint.h local.h local.c playlist.c playlist.h \ + streamdump.h streamdump.c term.c term.h wav.c win32_support.h \ + wavhead.h xfermem.c xfermem.h $(am__append_1) +tests_seek_accuracy_SOURCES = \ +tests/seek_accuracy.c \ +libmpg123/compat.h \ +libmpg123/compat.c + +tests_seek_accuracy_DEPENDENCIES = libmpg123/libmpg123.la +tests_seek_accuracy_LDADD = libmpg123/libmpg123.la +tests_seek_whence_SOURCES = \ +tests/seek_whence.c \ +libmpg123/compat.h \ +libmpg123/compat.c + +tests_seek_whence_DEPENDENCIES = libmpg123/libmpg123.la +tests_seek_whence_LDADD = libmpg123/libmpg123.la +tests_noise_SOURCES = \ +tests/noise.c \ +libmpg123/compat.h \ +libmpg123/compat.c \ +libmpg123/dither.h \ +libmpg123/dither.c + +tests_text_SOURCES = \ +tests/text.c \ +tests/testtext.h \ +libmpg123/compat.h \ +libmpg123/compat.c + +tests_text_DEPENDENCIES = libmpg123/libmpg123.la +tests_text_LDADD = libmpg123/libmpg123.la +tests_plain_id3_SOURCES = \ +tests/plain_id3.c \ +libmpg123/compat.h \ +libmpg123/compat.c + +tests_plain_id3_DEPENDENCIES = libmpg123/libmpg123.la +tests_plain_id3_LDADD = libmpg123/libmpg123.la +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +config.h: stamp-h1 + @if test ! -f $@; then rm -f stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status src/config.h +$(srcdir)/config.h.in: $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +mpg123$(EXEEXT): $(mpg123_OBJECTS) $(mpg123_DEPENDENCIES) $(EXTRA_mpg123_DEPENDENCIES) + @rm -f mpg123$(EXEEXT) + $(mpg123_LINK) $(mpg123_OBJECTS) $(mpg123_LDADD) $(LIBS) +tests/$(am__dirstamp): + @$(MKDIR_P) tests + @: > tests/$(am__dirstamp) +tests/noise$(EXEEXT): $(tests_noise_OBJECTS) $(tests_noise_DEPENDENCIES) $(EXTRA_tests_noise_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/noise$(EXEEXT) + $(LINK) $(tests_noise_OBJECTS) $(tests_noise_LDADD) $(LIBS) +tests/plain_id3$(EXEEXT): $(tests_plain_id3_OBJECTS) $(tests_plain_id3_DEPENDENCIES) $(EXTRA_tests_plain_id3_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/plain_id3$(EXEEXT) + $(LINK) $(tests_plain_id3_OBJECTS) $(tests_plain_id3_LDADD) $(LIBS) +tests/seek_accuracy$(EXEEXT): $(tests_seek_accuracy_OBJECTS) $(tests_seek_accuracy_DEPENDENCIES) $(EXTRA_tests_seek_accuracy_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/seek_accuracy$(EXEEXT) + $(LINK) $(tests_seek_accuracy_OBJECTS) $(tests_seek_accuracy_LDADD) $(LIBS) +tests/seek_whence$(EXEEXT): $(tests_seek_whence_OBJECTS) $(tests_seek_whence_DEPENDENCIES) $(EXTRA_tests_seek_whence_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/seek_whence$(EXEEXT) + $(LINK) $(tests_seek_whence_OBJECTS) $(tests_seek_whence_LDADD) $(LIBS) +tests/text$(EXEEXT): $(tests_text_OBJECTS) $(tests_text_DEPENDENCIES) $(EXTRA_tests_text_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/text$(EXEEXT) + $(LINK) $(tests_text_OBJECTS) $(tests_text_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/control_generic.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dither.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/equalizer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/genre.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getlopt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/httpget.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/local.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/metaprint.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpg123.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/noise.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plain_id3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/playlist.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolver.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seek_accuracy.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seek_whence.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/streamdump.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/term.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wav.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32_net.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32_support.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfermem.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +compat.o: libmpg123/compat.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT compat.o -MD -MP -MF $(DEPDIR)/compat.Tpo -c -o compat.o `test -f 'libmpg123/compat.c' || echo '$(srcdir)/'`libmpg123/compat.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/compat.Tpo $(DEPDIR)/compat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libmpg123/compat.c' object='compat.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o compat.o `test -f 'libmpg123/compat.c' || echo '$(srcdir)/'`libmpg123/compat.c + +compat.obj: libmpg123/compat.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT compat.obj -MD -MP -MF $(DEPDIR)/compat.Tpo -c -o compat.obj `if test -f 'libmpg123/compat.c'; then $(CYGPATH_W) 'libmpg123/compat.c'; else $(CYGPATH_W) '$(srcdir)/libmpg123/compat.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/compat.Tpo $(DEPDIR)/compat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libmpg123/compat.c' object='compat.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o compat.obj `if test -f 'libmpg123/compat.c'; then $(CYGPATH_W) 'libmpg123/compat.c'; else $(CYGPATH_W) '$(srcdir)/libmpg123/compat.c'; fi` + +noise.o: tests/noise.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT noise.o -MD -MP -MF $(DEPDIR)/noise.Tpo -c -o noise.o `test -f 'tests/noise.c' || echo '$(srcdir)/'`tests/noise.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/noise.Tpo $(DEPDIR)/noise.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/noise.c' object='noise.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o noise.o `test -f 'tests/noise.c' || echo '$(srcdir)/'`tests/noise.c + +noise.obj: tests/noise.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT noise.obj -MD -MP -MF $(DEPDIR)/noise.Tpo -c -o noise.obj `if test -f 'tests/noise.c'; then $(CYGPATH_W) 'tests/noise.c'; else $(CYGPATH_W) '$(srcdir)/tests/noise.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/noise.Tpo $(DEPDIR)/noise.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/noise.c' object='noise.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o noise.obj `if test -f 'tests/noise.c'; then $(CYGPATH_W) 'tests/noise.c'; else $(CYGPATH_W) '$(srcdir)/tests/noise.c'; fi` + +dither.o: libmpg123/dither.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dither.o -MD -MP -MF $(DEPDIR)/dither.Tpo -c -o dither.o `test -f 'libmpg123/dither.c' || echo '$(srcdir)/'`libmpg123/dither.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dither.Tpo $(DEPDIR)/dither.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libmpg123/dither.c' object='dither.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dither.o `test -f 'libmpg123/dither.c' || echo '$(srcdir)/'`libmpg123/dither.c + +dither.obj: libmpg123/dither.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dither.obj -MD -MP -MF $(DEPDIR)/dither.Tpo -c -o dither.obj `if test -f 'libmpg123/dither.c'; then $(CYGPATH_W) 'libmpg123/dither.c'; else $(CYGPATH_W) '$(srcdir)/libmpg123/dither.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dither.Tpo $(DEPDIR)/dither.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libmpg123/dither.c' object='dither.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dither.obj `if test -f 'libmpg123/dither.c'; then $(CYGPATH_W) 'libmpg123/dither.c'; else $(CYGPATH_W) '$(srcdir)/libmpg123/dither.c'; fi` + +plain_id3.o: tests/plain_id3.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT plain_id3.o -MD -MP -MF $(DEPDIR)/plain_id3.Tpo -c -o plain_id3.o `test -f 'tests/plain_id3.c' || echo '$(srcdir)/'`tests/plain_id3.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/plain_id3.Tpo $(DEPDIR)/plain_id3.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/plain_id3.c' object='plain_id3.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o plain_id3.o `test -f 'tests/plain_id3.c' || echo '$(srcdir)/'`tests/plain_id3.c + +plain_id3.obj: tests/plain_id3.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT plain_id3.obj -MD -MP -MF $(DEPDIR)/plain_id3.Tpo -c -o plain_id3.obj `if test -f 'tests/plain_id3.c'; then $(CYGPATH_W) 'tests/plain_id3.c'; else $(CYGPATH_W) '$(srcdir)/tests/plain_id3.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/plain_id3.Tpo $(DEPDIR)/plain_id3.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/plain_id3.c' object='plain_id3.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o plain_id3.obj `if test -f 'tests/plain_id3.c'; then $(CYGPATH_W) 'tests/plain_id3.c'; else $(CYGPATH_W) '$(srcdir)/tests/plain_id3.c'; fi` + +seek_accuracy.o: tests/seek_accuracy.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT seek_accuracy.o -MD -MP -MF $(DEPDIR)/seek_accuracy.Tpo -c -o seek_accuracy.o `test -f 'tests/seek_accuracy.c' || echo '$(srcdir)/'`tests/seek_accuracy.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/seek_accuracy.Tpo $(DEPDIR)/seek_accuracy.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/seek_accuracy.c' object='seek_accuracy.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o seek_accuracy.o `test -f 'tests/seek_accuracy.c' || echo '$(srcdir)/'`tests/seek_accuracy.c + +seek_accuracy.obj: tests/seek_accuracy.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT seek_accuracy.obj -MD -MP -MF $(DEPDIR)/seek_accuracy.Tpo -c -o seek_accuracy.obj `if test -f 'tests/seek_accuracy.c'; then $(CYGPATH_W) 'tests/seek_accuracy.c'; else $(CYGPATH_W) '$(srcdir)/tests/seek_accuracy.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/seek_accuracy.Tpo $(DEPDIR)/seek_accuracy.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/seek_accuracy.c' object='seek_accuracy.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o seek_accuracy.obj `if test -f 'tests/seek_accuracy.c'; then $(CYGPATH_W) 'tests/seek_accuracy.c'; else $(CYGPATH_W) '$(srcdir)/tests/seek_accuracy.c'; fi` + +seek_whence.o: tests/seek_whence.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT seek_whence.o -MD -MP -MF $(DEPDIR)/seek_whence.Tpo -c -o seek_whence.o `test -f 'tests/seek_whence.c' || echo '$(srcdir)/'`tests/seek_whence.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/seek_whence.Tpo $(DEPDIR)/seek_whence.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/seek_whence.c' object='seek_whence.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o seek_whence.o `test -f 'tests/seek_whence.c' || echo '$(srcdir)/'`tests/seek_whence.c + +seek_whence.obj: tests/seek_whence.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT seek_whence.obj -MD -MP -MF $(DEPDIR)/seek_whence.Tpo -c -o seek_whence.obj `if test -f 'tests/seek_whence.c'; then $(CYGPATH_W) 'tests/seek_whence.c'; else $(CYGPATH_W) '$(srcdir)/tests/seek_whence.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/seek_whence.Tpo $(DEPDIR)/seek_whence.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/seek_whence.c' object='seek_whence.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o seek_whence.obj `if test -f 'tests/seek_whence.c'; then $(CYGPATH_W) 'tests/seek_whence.c'; else $(CYGPATH_W) '$(srcdir)/tests/seek_whence.c'; fi` + +text.o: tests/text.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT text.o -MD -MP -MF $(DEPDIR)/text.Tpo -c -o text.o `test -f 'tests/text.c' || echo '$(srcdir)/'`tests/text.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/text.Tpo $(DEPDIR)/text.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/text.c' object='text.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o text.o `test -f 'tests/text.c' || echo '$(srcdir)/'`tests/text.c + +text.obj: tests/text.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT text.obj -MD -MP -MF $(DEPDIR)/text.Tpo -c -o text.obj `if test -f 'tests/text.c'; then $(CYGPATH_W) 'tests/text.c'; else $(CYGPATH_W) '$(srcdir)/tests/text.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/text.Tpo $(DEPDIR)/text.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/text.c' object='text.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o text.obj `if test -f 'tests/text.c'; then $(CYGPATH_W) 'tests/text.c'; else $(CYGPATH_W) '$(srcdir)/tests/text.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + -rm -rf tests/.libs tests/_libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done +cscopelist-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(PROGRAMS) config.h +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -rm -f tests/$(am__dirstamp) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ + cscopelist-recursive ctags-recursive install-am install-strip \ + tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool cscopelist cscopelist-recursive \ + ctags ctags-recursive distclean distclean-compile \ + distclean-generic distclean-hdr distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# That is not nice... but it is how I manage to get the dependency on output/alsa.o without error about .deps/output/alsa.Tpo . +# Did I mention that recursive make sucks? +# `%'-style pattern rules are a GNU make extension +#find output/ -name '*.c' | perl -ne 'chomp; $mod=$_; $mod=~s/\.c$/.\$(OBJEXT)/; +#print "$mod: $_ audio.h module.h\n"; +#print "\tcd output && \$(MAKE)\n\n";' + +output/coreaudio.$(OBJEXT): output/coreaudio.c audio.h module.h + cd output && $(MAKE) + +output/win32.$(OBJEXT): output/win32.c audio.h module.h + cd output && $(MAKE) + +output/alsa05.$(OBJEXT): output/alsa05.c audio.h module.h + cd output && $(MAKE) + +output/sdl.$(OBJEXT): output/sdl.c audio.h module.h + cd output && $(MAKE) + +output/dummy.$(OBJEXT): output/dummy.c audio.h module.h + cd output && $(MAKE) + +output/alib.$(OBJEXT): output/alib.c audio.h module.h + cd output && $(MAKE) + +output/libao.$(OBJEXT): output/libao.c audio.h module.h + cd output && $(MAKE) + +output/sun.$(OBJEXT): output/sun.c audio.h module.h + cd output && $(MAKE) + +output/aix.$(OBJEXT): output/aix.c audio.h module.h + cd output && $(MAKE) + +output/oss.$(OBJEXT): output/oss.c audio.h module.h + cd output && $(MAKE) + +output/mint.$(OBJEXT): output/mint.c audio.h module.h + cd output && $(MAKE) + +output/pulse.$(OBJEXT): output/pulse.c audio.h module.h + cd output && $(MAKE) + +output/jack.$(OBJEXT): output/jack.c audio.h module.h + cd output && $(MAKE) + +output/os2.$(OBJEXT): output/os2.c audio.h module.h + cd output && $(MAKE) + +output/nas.$(OBJEXT): output/nas.c audio.h module.h + cd output && $(MAKE) + +output/sgi.$(OBJEXT): output/sgi.c audio.h module.h + cd output && $(MAKE) + +output/portaudio.$(OBJEXT): output/portaudio.c audio.h module.h + cd output && $(MAKE) + +output/arts.$(OBJEXT): output/arts.c audio.h module.h + cd output && $(MAKE) + +output/esd.$(OBJEXT): output/esd.c audio.h module.h + cd output && $(MAKE) + +output/alsa.$(OBJEXT): output/alsa.c audio.h module.h + cd output && $(MAKE) + +output/hp.$(OBJEXT): output/hp.c audio.h module.h + cd output && $(MAKE) + +output/sndio.$(OBJEXT): output/sndio.c audio.h module.h + cd output && $(MAKE) + +# Would have to mention _all_ source files... Dammit, that's what the libmpg123/Makefile.am does! +# But again, the a make $something here needs that stupid rule... WHY??? +libmpg123/libmpg123.la: config.h libmpg123/mpg123.h + cd libmpg123 && $(MAKE) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/deps/mpg123/src/audio.c b/deps/mpg123/src/audio.c new file mode 100644 index 0000000..9a3369e --- /dev/null +++ b/deps/mpg123/src/audio.c @@ -0,0 +1,725 @@ +/* + audio: audio output interface + + copyright ?-2008 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Michael Hipp +*/ + +#include +#include "mpg123app.h" +#include "common.h" +#include "buffer.h" + +#ifdef HAVE_SYS_WAIT_H +#include +#endif + +#include "debug.h" + +static int file_write(struct audio_output_struct* ao, unsigned char *bytes, int count) +{ + return (int)write(ao->fn, bytes, count); +} +static int wave_write(struct audio_output_struct* ao, unsigned char *bytes, int count) +{ + return wav_write(bytes, count); +} +static int builtin_get_formats(struct audio_output_struct *ao) +{ + if(param.outmode == DECODE_CDR) + { + if(ao->rate == 44100 && ao->channels == 2) + return MPG123_ENC_SIGNED_16; + else + return 0; + } + else if(param.outmode == DECODE_AU) return MPG123_ENC_SIGNED_16|MPG123_ENC_UNSIGNED_8|MPG123_ENC_ULAW_8; + else if(param.outmode == DECODE_WAV) return MPG123_ENC_SIGNED_16|MPG123_ENC_UNSIGNED_8|MPG123_ENC_FLOAT_32|MPG123_ENC_SIGNED_24|MPG123_ENC_SIGNED_32; + else return MPG123_ENC_ANY; +} +static int builtin_close(struct audio_output_struct *ao) +{ + switch(param.outmode) + { + case DECODE_WAV: + return wav_close(); + break; + case DECODE_AU: + return au_close(); + break; + case DECODE_CDR: + return cdr_close(); + break; + } + return -1; +} +static int builtin_nothingint(struct audio_output_struct *ao){ return 0; } +static void builtin_nothing(struct audio_output_struct *ao){} + +audio_output_t* open_fake_module(void) +{ + audio_output_t *ao = NULL; + ao = alloc_audio_output(); + if(ao == NULL) + { + error("Cannot allocate memory for audio output data."); + return NULL; + } + ao->module = NULL; + ao->open = builtin_nothingint; + ao->flush = builtin_nothing; + ao->get_formats = builtin_get_formats; + ao->write = wave_write; + ao->close = builtin_close; + ao->device = param.filename; + ao->is_open = FALSE; + switch(param.outmode) + { + case DECODE_FILE: + ao->fn = OutputDescriptor; + ao->write = file_write; + break; + case DECODE_WAV: + ao->open = wav_open; + break; + case DECODE_CDR: + ao->open = cdr_open; + break; + case DECODE_AU: + ao->open = au_open; + break; + case DECODE_TEST: + break; + } + + return ao; +} + +/* Open an audio output module, trying modules in list (comma-separated). */ +audio_output_t* open_output_module( const char* names ) +{ + mpg123_module_t *module = NULL; + audio_output_t *ao = NULL; + int result = 0; + char *curname, *modnames; + + if(param.usebuffer || names==NULL) return NULL; + + /* Use internal code. */ + if(param.outmode != DECODE_AUDIO) return open_fake_module(); + + modnames = strdup(names); + if(modnames == NULL) + { + error("Error allocating memory for module names."); + return NULL; + } + /* Now loop over the list of possible modules to find one that works. */ + curname = strtok(modnames, ","); + while(curname != NULL) + { + char* name = curname; + curname = strtok(NULL, ","); + if(param.verbose > 1) fprintf(stderr, "Trying output module %s.\n", name); + /* Open the module, initial check for availability+libraries. */ + module = open_module( "output", name ); + if(module == NULL) continue; + /* Check if module supports output */ + if(module->init_output == NULL) + { + error1("Module '%s' does not support audio output.", name); + close_module(module); + continue; /* Try next one. */ + } + /* Allocation+initialization of memory for audio output type. */ + ao = alloc_audio_output(); + if(ao==NULL) + { + error("Failed to allocate audio output structure."); + close_module(module); + break; /* This is fatal. */ + } + + /* Call the init function */ + ao->device = param.output_device; + ao->flags = param.output_flags; + /* Should I do funny stuff with stderr file descriptor instead? */ + if(curname == NULL) + { + if(param.verbose > 1) + fprintf(stderr, "Note: %s is the last output option... showing you any error messages now.\n", name); + } + else ao->auxflags |= MPG123_OUT_QUIET; /* Probing, so don't spill stderr with errors. */ + ao->is_open = FALSE; + ao->module = module; /* Need that to close module later. */ + result = module->init_output(ao); + if(result == 0) + { /* Try to open the device. I'm only interested in actually working modules. */ + result = open_output(ao); + close_output(ao); + } + else error2("Module '%s' init failed: %i", name, result); + + if(result!=0) + { /* Try next one... */ + close_module(module); + free(ao); + ao = NULL; + } + else + { /* All good, leave the loop. */ + if(param.verbose > 1) fprintf(stderr, "Output module '%s' chosen.\n", name); + + ao->auxflags &= ~MPG123_OUT_QUIET; + break; + } + } + + free(modnames); + if(ao==NULL) error1("Unable to find a working output module in this list: %s", names); + + return ao; +} + + + +/* Close the audio output and close the module */ +void close_output_module( audio_output_t* ao ) +{ + if (!ao) return; /* That covers buffer mode, too (ao == NULL there). */ + + debug("closing output module"); + /* Close the audio output */ + if(ao->is_open && ao->close != NULL) ao->close(ao); + + /* Deinitialise the audio output */ + if (ao->deinit) ao->deinit( ao ); + + /* Unload the module */ + if (ao->module) close_module( ao->module ); + + /* Free up memory */ + free( ao ); +} + + + +/* allocate and initialise memory */ +audio_output_t* alloc_audio_output() +{ + audio_output_t* ao = malloc( sizeof( audio_output_t ) ); + if (ao==NULL) error( "Failed to allocate memory for audio_output_t." ); + + /* Initialise variables */ + ao->fn = -1; + ao->rate = -1; + ao->gain = param.gain; + ao->userptr = NULL; + ao->device = NULL; + ao->channels = -1; + ao->format = -1; + ao->flags = 0; + ao->auxflags = 0; + + /*ao->module = NULL;*/ + + /* Set the callbacks to NULL */ + ao->open = NULL; + ao->get_formats = NULL; + ao->write = NULL; + ao->flush = NULL; + ao->close = NULL; + ao->deinit = NULL; + + return ao; +} + +/* +static void audio_output_dump(audio_output_t *ao) +{ + fprintf(stderr, "ao->fn=%d\n", ao->fn); + fprintf(stderr, "ao->userptr=%p\n", ao->userptr); + fprintf(stderr, "ao->rate=%ld\n", ao->rate); + fprintf(stderr, "ao->gain=%ld\n", ao->gain); + fprintf(stderr, "ao->device='%s'\n", ao->device); + fprintf(stderr, "ao->channels=%d\n", ao->channels); + fprintf(stderr, "ao->format=%d\n", ao->format); +} +*/ + +struct enc_desc +{ + int code; /* MPG123_ENC_SOMETHING */ + const char *longname; /* signed bla bla */ + const char *name; /* sXX, short name */ + const unsigned char nlen; /* significant characters in short name */ +}; + +static const struct enc_desc encdesc[] = +{ + { MPG123_ENC_SIGNED_16, "signed 16 bit", "s16 ", 3 }, + { MPG123_ENC_UNSIGNED_16, "unsigned 16 bit", "u16 ", 3 }, + { MPG123_ENC_UNSIGNED_8, "unsigned 8 bit", "u8 ", 2 }, + { MPG123_ENC_SIGNED_8, "signed 8 bit", "s8 ", 2 }, + { MPG123_ENC_ULAW_8, "mu-law (8 bit)", "ulaw ", 4 }, + { MPG123_ENC_ALAW_8, "a-law (8 bit)", "alaw ", 4 }, + { MPG123_ENC_FLOAT_32, "float (32 bit)", "f32 ", 3 }, + { MPG123_ENC_SIGNED_32, "signed 32 bit", "s32 ", 3 }, + { MPG123_ENC_UNSIGNED_32, "unsigned 32 bit", "u32 ", 3 }, + { MPG123_ENC_SIGNED_24, "signed 24 bit", "s24 ", 3 }, + { MPG123_ENC_UNSIGNED_24, "unsigned 24 bit", "u24 ", 3 } +}; +#define KNOWN_ENCS (sizeof(encdesc)/sizeof(struct enc_desc)) + +void audio_enclist(char** list) +{ + size_t length = 0; + int i; + *list = NULL; + for(i=0;i0) (*list)[off++] = ' '; + memcpy(*list+off, encdesc[i].name, encdesc[i].nlen); + off += encdesc[i].nlen; + } + } +} + +/* Safer as function... */ +const char* audio_encoding_name(const int encoding, const int longer) +{ + const char *name = longer ? "unknown" : "???"; + int i; + for(i=0;imodule ? ao->module->name : "file/raw/test"; + if(ao->device != NULL) dev = ao->device; + } + mpg123_rates(&rates, &num_rates); + mpg123_encodings(&encs, &num_encs); + fprintf(stderr,"\nAudio driver: %s\nAudio device: %s\nAudio capabilities:\n(matrix of [S]tereo or [M]ono support for sample format and rate in Hz)\n |", name, dev); + for(e=0;e 2) fprintf(stderr, "Note: forcing encoding code 0x%x\n", force_fmt); + } + rlimit = param.force_rate > 0 ? num_rates+1 : num_rates; + for(channels=1; channels<=2; channels++) + for(ri = 0;ri 2) fprintf(stderr, "Note: checking support for %liHz/%ich.\n", rate, channels); +#ifndef NOXFERMEM + if(param.usebuffer) + { /* Ask the buffer process. It is waiting for this. */ + buffermem->rate = rate; + buffermem->channels = channels; + buffermem->format = 0; /* Just have it initialized safely. */ + debug2("asking for formats for %liHz/%ich", rate, channels); + xfermem_putcmd(buffermem->fd[XF_WRITER], XF_CMD_AUDIOCAP); + xfermem_getcmd(buffermem->fd[XF_WRITER], TRUE); + fmts = buffermem->format; + } + else +#endif + { /* Check myself. */ + ao->rate = rate; + ao->channels = channels; + fmts = ao->get_formats(ao); + } + if(param.verbose > 2) fprintf(stderr, "Note: result 0x%x\n", fmts); + if(force_fmt) + { /* Filter for forced encoding. */ + if((fmts & force_fmt) == force_fmt) fmts = force_fmt; + else fmts = 0; /* Nothing else! */ + + if(param.verbose > 2) fprintf(stderr, "Note: after forcing 0x%x\n", fmts); + } + + if(fmts < 0) continue; + else mpg123_format(mh, decode_rate, channels, fmts); + } + +#ifndef NOXFERMEM + /* Buffer loop shall start normal operation now. */ + if(param.usebuffer) + { + xfermem_putcmd(buffermem->fd[XF_WRITER], XF_CMD_WAKEUP); + xfermem_getcmd(buffermem->fd[XF_WRITER], TRUE); + } +#endif + + if(param.verbose > 1) print_capabilities(ao, mh); +} + +#if !defined(WIN32) && !defined(GENERIC) +#ifndef NOXFERMEM +static void catch_child(void) +{ + while (waitpid(-1, NULL, WNOHANG) > 0); +} +#endif +#endif + + +/* FIXME: Old output initialization code that needs updating */ + +int init_output(audio_output_t **ao) +{ + static int init_done = FALSE; + + if (init_done) return 1; + init_done = TRUE; + +#ifndef NOXFERMEM + if (param.usebuffer) + { + unsigned int bufferbytes; + sigset_t newsigset, oldsigset; + bufferbytes = (param.usebuffer * 1024); + if (bufferbytes < bufferblock) + { + bufferbytes = 2*bufferblock; + if(!param.quiet) fprintf(stderr, "Note: raising buffer to minimal size %liKiB\n", (unsigned long) bufferbytes>>10); + } + bufferbytes -= bufferbytes % bufferblock; + /* No +1024 for NtoM rounding problems anymore! */ + xfermem_init (&buffermem, bufferbytes ,0,0); + sigemptyset (&newsigset); + /* ThOr: I'm not quite sure why we need to block that signal here. */ + sigaddset (&newsigset, SIGUSR1); + sigprocmask (SIG_BLOCK, &newsigset, &oldsigset); +#if !defined(WIN32) && !defined(GENERIC) + catchsignal (SIGCHLD, catch_child); +#endif + switch ((buffer_pid = fork())) + { + case -1: /* error */ + error("cannot fork!"); + return -1; + case 0: /* child */ + { + /* Buffer process handles all audio stuff itself. */ + audio_output_t *bao = NULL; /* To be clear: That's the buffer's pointer. */ + param.usebuffer = 0; /* The buffer doesn't use the buffer. */ + /* Open audio output module */ + bao = open_output_module(param.output_module); + if(!bao) + { + error("Failed to open audio output module."); + exit(1); /* communicate failure? */ + } + if(open_output(bao) < 0) + { + error("Unable to open audio output."); + close_output_module(bao); + exit(2); + } + xfermem_init_reader (buffermem); + buffer_loop(bao, &oldsigset); /* Here the work happens. */ + xfermem_done_reader (buffermem); + xfermem_done (buffermem); + close_output(bao); + close_output_module(bao); + exit(0); + } + default: /* parent */ + xfermem_init_writer (buffermem); + } + /* ThOr: I want that USR1 signal back for control. */ + sigprocmask(SIG_UNBLOCK, &newsigset, NULL); + } +#else + if(param.usebuffer) + { + error("Buffer not available in this build!"); + return -1; + } +#endif + if(!param.usebuffer) + { /* Only if I handle audio device output: Get that module. */ + *ao = open_output_module(param.output_module); + if(!(*ao)) + { + error("Failed to open audio output module"); + return -1; + } + } + else *ao = NULL; /* That ensures we won't try to free it later... */ +#ifndef NOXFERMEM + if(param.usebuffer) + { /* Check if buffer is alive. */ + int res = xfermem_getcmd(buffermem->fd[XF_WRITER], TRUE); + if(res < 0) + { + error("Buffer process didn't initialize!"); + return -1; + } + } +#endif + /* This has internal protection for buffer mode. */ + if(open_output(*ao) < 0) return -1; + + return 0; +} + +void exit_output(audio_output_t *ao, int rude) +{ + debug("exit output"); +#ifndef NOXFERMEM + if (param.usebuffer) + { + debug("ending buffer"); + buffer_stop(); /* Puts buffer into waiting-for-command mode. */ + buffer_end(rude); /* Gives command to end operation. */ + xfermem_done_writer(buffermem); + waitpid (buffer_pid, NULL, 0); + xfermem_done (buffermem); + } +#endif + /* Close the output... doesn't matter if buffer handled it, that's taken care of. */ + close_output(ao); + close_output_module(ao); +} + +void output_pause(audio_output_t *ao) +{ + if(param.usebuffer) buffer_stop(); + else ao->flush(ao); +} + +void output_unpause(audio_output_t *ao) +{ + if(param.usebuffer) buffer_start(); +} + +int flush_output(audio_output_t *ao, unsigned char *bytes, size_t count) +{ + if(count) + { + /* Error checks? */ +#ifndef NOXFERMEM + if(param.usebuffer){ if(xfermem_write(buffermem, bytes, count)) return -1; } + else +#endif + if(param.outmode != DECODE_TEST) + { + int sum = 0; + int written; + do + { /* Be in a loop for SIGSTOP/CONT */ + written = ao->write(ao, bytes, (int)count); + if(written >= 0){ sum+=written; count -= written; } + else error1("Error in writing audio (%s?)!", strerror(errno)); + } while(count>0 && written>=0); + return sum; + } + } + return (int)count; /* That is for DECODE_TEST */ +} + +int open_output(audio_output_t *ao) +{ + if(param.usebuffer) return 0; + + if(ao == NULL) + { + error("ao should not be NULL here!"); + exit(110); + } + + switch(param.outmode) + { + case DECODE_AUDIO: + case DECODE_WAV: + case DECODE_AU: + case DECODE_CDR: + case DECODE_FILE: + debug("opening normal audio/file"); + ao->is_open = ao->open(ao) < 0 ? FALSE : TRUE; + if(!ao->is_open) + { + if(!AOQUIET) error("failed to open audio device"); + return -1; + } + else return 0; + break; + case DECODE_TEST: + debug("decoding to nowhere"); + return 0; + break; + } + debug("nothing"); + return -1; /* That's an error ... unknown outmode? */ +} + +/* is this used? */ +void close_output(audio_output_t *ao) +{ + if(param.usebuffer) return; + + debug("closing output"); + switch(param.outmode) + { + case DECODE_AUDIO: + case DECODE_WAV: + case DECODE_AU: + case DECODE_CDR: + /* Guard that close call; could be nasty. */ + if(ao->is_open) + { + ao->is_open = FALSE; + if(ao->close != NULL) ao->close(ao); + } + break; + } +} + +/* Also for WAV decoding? */ +int reset_output(audio_output_t *ao) +{ + if(!param.usebuffer) + { + close_output(ao); + return open_output(ao); + } + else return 0; +} + +int set_pitch(mpg123_handle *fr, audio_output_t *ao, double new_pitch) +{ + int ret = 1; + double old_pitch = param.pitch; + long rate; + int channels, format; + int smode = 0; + + /* Be safe, check support. */ + if(mpg123_getformat(fr, &rate, &channels, &format) != MPG123_OK) + { + /* We might just not have a track handy. */ + error("There is no current audio format, cannot apply pitch. This might get fixed in future."); + return 0; + } + + if(param.usebuffer) + { + error("No runtime pitch change with output buffer, sorry."); + return 0; + } + + param.pitch = new_pitch; + if(param.pitch < -0.99) param.pitch = -0.99; + + if(channels == 1) smode = MPG123_MONO; + if(channels == 2) smode = MPG123_STEREO; + + output_pause(ao); + /* Remember: This takes param.pitch into account. */ + audio_capabilities(ao, fr); + if(!(mpg123_format_support(fr, rate, format) & smode)) + { + /* Note: When using --pitch command line parameter, you can go higher + because a lower decoder sample rate is automagically chosen. + Here, we'd need to switch decoder rate during track... good? */ + error("Reached a hardware limit there with pitch!"); + param.pitch = old_pitch; + audio_capabilities(ao, fr); + ret = 0; + } + ao->format = format; + ao->channels = channels; + ao->rate = pitch_rate(rate); + reset_output(ao); + output_unpause(ao); + return ret; +} + diff --git a/deps/mpg123/src/audio.h b/deps/mpg123/src/audio.h new file mode 100644 index 0000000..6fff8cd --- /dev/null +++ b/deps/mpg123/src/audio.h @@ -0,0 +1,106 @@ +/* + audio: audio output interface + + copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Michael Hipp +*/ + +/* + * Audio 'LIB' defines + */ + + +#ifndef _MPG123_AUDIO_H_ +#define _MPG123_AUDIO_H_ + +#include "compat.h" +#include "mpg123.h" +#include "module.h" + +#define AUDIO_OUT_HEADPHONES 0x01 +#define AUDIO_OUT_INTERNAL_SPEAKER 0x02 +#define AUDIO_OUT_LINE_OUT 0x04 + +enum { + DECODE_TEST, + DECODE_AUDIO, + DECODE_FILE, + DECODE_BUFFER, + DECODE_WAV, + DECODE_AU, + DECODE_CDR, + DECODE_AUDIOFILE +}; + +/* 3% rate tolerance */ +#define AUDIO_RATE_TOLERANCE 3 + +typedef struct audio_output_struct +{ + int fn; /* filenumber */ + void *userptr; /* driver specific pointer */ + + /* Callbacks */ + int (*open)(struct audio_output_struct *); + int (*get_formats)(struct audio_output_struct *); + int (*write)(struct audio_output_struct *, unsigned char *,int); + void (*flush)(struct audio_output_struct *); + int (*close)(struct audio_output_struct *); + int (*deinit)(struct audio_output_struct *); + + /* the module this belongs to */ + mpg123_module_t *module; + + char *device; /* device name */ + int flags; /* some bits; namely headphone/speaker/line */ + long rate; /* sample rate */ + long gain; /* output gain */ + int channels; /* number of channels */ + int format; /* format flags */ + int is_open; /* something opened? */ +#define MPG123_OUT_QUIET 1 + int auxflags; /* For now just one: quiet mode (for probing). */ +} audio_output_t; + +/* Lazy. */ +#define AOQUIET (ao->auxflags & MPG123_OUT_QUIET) + +struct audio_format_name { + int val; + char *name; + char *sname; +}; + +#define pitch_rate(rate) (param.pitch == 0 ? (rate) : (long) ((param.pitch+1.0)*(rate))) + +/* ------ Declarations from "audio.c" ------ */ + +audio_output_t* open_output_module( const char* name ); +void close_output_module( audio_output_t* ao ); +audio_output_t* alloc_audio_output(); +void audio_capabilities(audio_output_t *ao, mpg123_handle *mh); +int audio_fit_capabilities(audio_output_t *ao,int c,int r); +const char* audio_encoding_name(const int encoding, const int longer); +void print_capabilities(audio_output_t *ao, mpg123_handle *mh); + +int init_output(audio_output_t **ao); +void exit_output(audio_output_t *ao, int rude); +int flush_output(audio_output_t *ao, unsigned char *bytes, size_t count); +int open_output(audio_output_t *ao); +void close_output(audio_output_t *ao ); +int reset_output(audio_output_t *ao); +void output_pause(audio_output_t *ao); /* Prepare output for inactivity. */ +void output_unpause(audio_output_t *ao); /* Reactivate output (buffer process). */ + +void audio_enclist(char** list); /* Make a string of encoding names. */ + +/* + Twiddle audio output rate to yield speedup/down (pitch) effect. + The actually achieved pitch value is stored in param.pitch. + Returns 1 if pitch setting succeeded, 0 otherwise. +*/ +int set_pitch(mpg123_handle *fr, audio_output_t *ao, double new_pitch); + +#endif + diff --git a/deps/mpg123/src/buffer.c b/deps/mpg123/src/buffer.c new file mode 100644 index 0000000..7a12281 --- /dev/null +++ b/deps/mpg123/src/buffer.c @@ -0,0 +1,312 @@ +/* + buffer.c: output buffer + + copyright 1997-2009 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Oliver Fromme + + I (ThOr) am reviewing this file at about the same daytime as Oliver's timestamp here: + Mon Apr 14 03:53:18 MET DST 1997 + - dammed night coders;-) +*/ + +#include "mpg123app.h" + +#ifndef NOXFERMEM + +#include "common.h" +#include +#include "debug.h" + +int outburst = 32768; + +static int intflag = FALSE; +static int usr1flag = FALSE; + +static void catch_interrupt (void) +{ + intflag = TRUE; +} + +static void catch_usr1 (void) +{ + usr1flag = TRUE; +} + +/* Interfaces to writer process */ + +extern void buffer_sig(int signal, int block); + +void real_buffer_ignore_lowmem(void) +{ + if (!buffermem) + return; + if(buffermem->wakeme[XF_READER]) + xfermem_putcmd(buffermem->fd[XF_WRITER], XF_CMD_WAKEUP); +} + +void real_buffer_end(int rude) +{ + if (!buffermem) + return; + xfermem_putcmd(buffermem->fd[XF_WRITER], rude ? XF_CMD_ABORT : XF_CMD_TERMINATE); +} + +void real_buffer_resync(void) +{ + if(buffermem->justwait) + { + buffermem->wakeme[XF_WRITER] = TRUE; + xfermem_putcmd(buffermem->fd[XF_WRITER], XF_CMD_RESYNC); + xfermem_getcmd(buffermem->fd[XF_WRITER], TRUE); + } + else buffer_sig(SIGINT, TRUE); +} + +void real_plain_buffer_resync(void) +{ + buffer_sig(SIGINT, FALSE); +} + +void real_buffer_reset(void) +{ + buffer_sig(SIGUSR1, TRUE); +} + +void real_buffer_start(void) +{ + if(buffermem->justwait) + { + debug("ending buffer's waiting"); + buffermem->justwait = FALSE; + xfermem_putcmd(buffermem->fd[XF_WRITER], XF_CMD_WAKEUP); + } +} + +void real_buffer_stop() +{ + buffermem->justwait = TRUE; + buffer_sig(SIGINT, TRUE); +} + +extern int buffer_pid; + +void buffer_sig(int signal, int block) +{ + if (!buffermem) return; + + if (!block) + { /* Just signal, do not wait for anything. */ + kill(buffer_pid, signal); + return; + } + + /* kill() and the waiting needs to be taken care of properly for parallel execution. + Nobody reported issues so far, but I want to be sure. */ + if(xfermem_sigblock(XF_WRITER, buffermem, buffer_pid, signal) != XF_CMD_WAKEUP) + perror("Could not resync/reset buffers"); + return; +} + +void buffer_loop(audio_output_t *ao, sigset_t *oldsigset) +{ + int bytes, outbytes; + int my_fd = buffermem->fd[XF_READER]; + txfermem *xf = buffermem; + int done = FALSE; + int preload; + + catchsignal (SIGINT, catch_interrupt); + catchsignal (SIGUSR1, catch_usr1); + sigprocmask (SIG_SETMASK, oldsigset, NULL); + + xfermem_putcmd(my_fd, XF_CMD_WAKEUP); + + debug("audio output: waiting for cap requests"); + /* wait for audio setup queries */ + while(1) + { + int cmd; + cmd = xfermem_block(XF_READER, xf); + if(cmd == XF_CMD_AUDIOCAP) + { + ao->rate = xf->rate; + ao->channels = xf->channels; + ao->format = ao->get_formats(ao); + debug3("formats for %liHz/%ich: 0x%x", ao->rate, ao->channels, ao->format); + xf->format = ao->format; + xfermem_putcmd(my_fd, XF_CMD_AUDIOCAP); + } + else if(cmd == XF_CMD_WAKEUP) + { + debug("got wakeup... leaving config mode"); + xfermem_putcmd(buffermem->fd[XF_READER], XF_CMD_WAKEUP); + break; + } + else + { + error1("unexpected command %i", cmd); + return; + } + } + + /* Fill complete buffer on first run before starting to play. + * Live mp3 streams constantly approach buffer underrun otherwise. [dk] + */ + preload = (int)(param.preload*xf->size); + if(preload > xf->size) preload = xf->size; + if(preload < 0) preload = 0; + + for (;;) { + if (intflag) { + debug("handle intflag... flushing"); + intflag = FALSE; + ao->flush(ao); + /* Either prepare for waiting or empty buffer now. */ + if(!xf->justwait) xf->readindex = xf->freeindex; + else + { + int cmd; + debug("Prepare for waiting; draining command queue. (There's a lot of wakeup commands pending, usually.)"); + do + { + cmd = xfermem_getcmd(my_fd, FALSE); + /* debug1("drain: %i", cmd); */ + } while(cmd > 0); + } + if(xf->wakeme[XF_WRITER]) xfermem_putcmd(my_fd, XF_CMD_WAKEUP); + } + if (usr1flag) { + debug("handling usr1flag"); + usr1flag = FALSE; + /* close and re-open in order to flush + * the device's internal buffer before + * changing the sample rate. [OF] + */ + /* writer must block when sending SIGUSR1 + * or we will lose all data processed + * in the meantime! [dk] + */ + xf->readindex = xf->freeindex; + /* We've nailed down the new starting location - + * writer is now safe to go on. [dk] + */ + if (xf->wakeme[XF_WRITER]) + xfermem_putcmd(my_fd, XF_CMD_WAKEUP); + ao->rate = xf->rate; + ao->channels = xf->channels; + ao->format = xf->format; + if (reset_output(ao) < 0) { + error1("failed to reset audio: %s", strerror(errno)); + exit(1); + } + } + if ( (bytes = xfermem_get_usedspace(xf)) < outburst ) { + /* if we got a buffer underrun we first + * fill 1/8 of the buffer before continue/start + * playing */ + if (preload < xf->size>>3) + preload = xf->size>>3; + if(preload < outburst) + preload = outburst; + } + debug1("bytes: %i", bytes); + if(xf->justwait || bytes < preload) { + int cmd; + if (done && !bytes) { + break; + } + + if(xf->justwait || !done) { + + /* Don't spill into errno check below. */ + errno = 0; + cmd = xfermem_block(XF_READER, xf); + debug1("got %i", cmd); + switch(cmd) { + + /* More input pending. */ + case XF_CMD_WAKEUP_INFO: + continue; + /* Yes, we know buffer is low but + * know we don't care. + */ + case XF_CMD_WAKEUP: + break; /* Proceed playing. */ + case XF_CMD_ABORT: /* Immediate end, discard buffer contents. */ + return; /* Cleanup happens outside of buffer_loop()*/ + case XF_CMD_TERMINATE: /* Graceful end, playing stuff in buffer and then return. */ + debug("going to terminate"); + done = TRUE; + break; + case XF_CMD_RESYNC: + debug("ordered resync"); + if (param.outmode == DECODE_AUDIO) ao->flush(ao); + + xf->readindex = xf->freeindex; + if (xf->wakeme[XF_WRITER]) xfermem_putcmd(my_fd, XF_CMD_WAKEUP); + continue; + break; + case -1: + if(intflag || usr1flag) /* Got signal, handle it at top of loop... */ + { + debug("buffer interrupted"); + continue; + } + if(errno) + error1("Yuck! Error in buffer handling... or somewhere unexpected: %s", strerror(errno)); + done = TRUE; + xf->readindex = xf->freeindex; + xfermem_putcmd(xf->fd[XF_READER], XF_CMD_TERMINATE); + break; + default: + fprintf(stderr, "\nEh!? Received unknown command 0x%x in buffer process.\n", cmd); + } + } + } + /* Hack! The writer issues XF_CMD_WAKEUP when first adjust + * audio settings. We do not want to lower the preload mark + * just yet! + */ + if (xf->justwait || !bytes) + continue; + preload = outburst; /* set preload to lower mark */ + if (bytes > xf->size - xf->readindex) + bytes = xf->size - xf->readindex; + if (bytes > outburst) + bytes = outburst; + + debug("write"); + outbytes = flush_output(ao, (unsigned char*) xf->data + xf->readindex, bytes); + + if(outbytes < bytes) + { + if(outbytes < 0) outbytes = 0; + if(!intflag && !usr1flag) { + error1("Ouch ... error while writing audio data: %s", strerror(errno)); + /* + * done==TRUE tells writer process to stop + * sending data. There might be some latency + * involved when resetting readindex to + * freeindex so we might need more than one + * cycle to terminate. (The number of cycles + * should be finite unless I managed to mess + * up something. ;-) [dk] + */ + done = TRUE; + xf->readindex = xf->freeindex; + xfermem_putcmd(xf->fd[XF_READER], XF_CMD_TERMINATE); + } + else debug("buffer interrupted"); + } + bytes = outbytes; + + xf->readindex = (xf->readindex + bytes) % xf->size; + if (xf->wakeme[XF_WRITER]) + xfermem_putcmd(my_fd, XF_CMD_WAKEUP); + } +} + +#endif + +/* EOF */ diff --git a/deps/mpg123/src/buffer.h b/deps/mpg123/src/buffer.h new file mode 100644 index 0000000..f0d6ffe --- /dev/null +++ b/deps/mpg123/src/buffer.h @@ -0,0 +1,45 @@ +/* + buffer.h: output buffer + + copyright 1999-2006 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Daniel Kobras / Oliver Fromme +*/ + +/* + * Application specific interaction between main and buffer + * process. This is much less generic than the functions in + * xfermem so I chose to put it in buffer.[hc]. + * 01/28/99 [dk] + */ + +#ifndef _MPG123_BUFFER_H_ +#define _MPG123_BUFFER_H_ + +#ifndef NOXFERMEM +void real_buffer_ignore_lowmem(void); +void real_buffer_end(int rude); +void real_buffer_resync(void); +void real_plain_buffer_resync(void); +void real_buffer_reset(void); +void real_buffer_start(void); +void real_buffer_stop(void); +/* Hm, that's funny preprocessor weirdness. */ +#define buffer_start() (param.usebuffer ? real_buffer_start(),0 : 0) +#define buffer_stop() (param.usebuffer ? real_buffer_stop(),0 : 0) +#define buffer_reset() (param.usebuffer ? real_buffer_reset(),0 : 0) +#define buffer_resync() (param.usebuffer ? real_buffer_resync(),0 : 0) +#define plain_buffer_resync() (param.usebuffer ? real_plain_buffer_resync(),0 : 0) +#define buffer_end(a) (param.usebuffer ? real_buffer_end(a),0 : 0) +#define buffer_ignore_lowmem() (param.usebuffer ? real_buffer_ignore_lowmem(),0 : 0) +#else +#define buffer_start() +#define buffer_stop() +#define buffer_reset() +#define buffer_resync() +#define plain_buffer_resync() +#define buffer_end() +#define buffer_ignore_lowmem() +#endif + +#endif diff --git a/deps/mpg123/src/common.c b/deps/mpg123/src/common.c new file mode 100644 index 0000000..9856202 --- /dev/null +++ b/deps/mpg123/src/common.c @@ -0,0 +1,240 @@ +/* + common: misc stuff... audio flush, status display... + + copyright ?-2008 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Michael Hipp +*/ + +#include "mpg123app.h" +#include +#include +#include "common.h" + +#include "debug.h" + +const char* rva_name[3] = { "off", "mix", "album" }; +static const char *modes[5] = {"Stereo", "Joint-Stereo", "Dual-Channel", "Single-Channel", "Invalid" }; +static const char *smodes[5] = { "stereo", "joint-stereo", "dual-channel", "mono", "invalid" }; +static const char *layers[4] = { "Unknown" , "I", "II", "III" }; +static const char *versions[4] = {"1.0", "2.0", "2.5", "x.x" }; +static const int samples_per_frame[4][4] = +{ + { -1,384,1152,1152 }, /* MPEG 1 */ + { -1,384,1152,576 }, /* MPEG 2 */ + { -1,384,1152,576 }, /* MPEG 2.5 */ + { -1,-1,-1,-1 }, /* Unknown */ +}; + + +#if (!defined(WIN32) || defined (__CYGWIN__)) && defined(HAVE_SIGNAL_H) +void (*catchsignal(int signum, void(*handler)()))() +{ + struct sigaction new_sa; + struct sigaction old_sa; + +#ifdef DONT_CATCH_SIGNALS + fprintf (stderr, "Not catching any signals.\n"); + return ((void (*)()) -1); +#endif + + new_sa.sa_handler = handler; + sigemptyset(&new_sa.sa_mask); + new_sa.sa_flags = 0; + if (sigaction(signum, &new_sa, &old_sa) == -1) + return ((void (*)()) -1); + return (old_sa.sa_handler); +} +#endif + +/* concurring to print_rheader... here for control_generic */ +const char* remote_header_help = "S "; +void print_remote_header(mpg123_handle *mh) +{ + struct mpg123_frameinfo i; + mpg123_info(mh, &i); + if(i.mode >= 4 || i.mode < 0) i.mode = 4; + if(i.version >= 3 || i.version < 0) i.version = 3; + generic_sendmsg("S %s %d %ld %s %d %d %d %d %d %d %d %d %d", + versions[i.version], + i.layer, + i.rate, + modes[i.mode], + i.mode_ext, + i.framesize, + i.mode == MPG123_M_MONO ? 1 : 2, + i.flags & MPG123_COPYRIGHT ? 1 : 0, + i.flags & MPG123_CRC ? 1 : 0, + i.emphasis, + i.bitrate, + i.flags & MPG123_PRIVATE ? 1 : 0, + i.vbr); +} + +void print_header(mpg123_handle *mh) +{ + struct mpg123_frameinfo i; + mpg123_info(mh, &i); + if(i.mode > 4 || i.mode < 0) i.mode = 4; + if(i.version > 3 || i.version < 0) i.version = 3; + if(i.layer > 3 || i.layer < 0) i.layer = 0; + fprintf(stderr,"MPEG %s, Layer: %s, Freq: %ld, mode: %s, modext: %d, BPF : %d\n", + versions[i.version], + layers[i.layer], i.rate, + modes[i.mode],i.mode_ext,i.framesize); + fprintf(stderr,"Channels: %d, copyright: %s, original: %s, CRC: %s, emphasis: %d.\n", + i.mode == MPG123_M_MONO ? 1 : 2,i.flags & MPG123_COPYRIGHT ? "Yes" : "No", + i.flags & MPG123_ORIGINAL ? "Yes" : "No", i.flags & MPG123_CRC ? "Yes" : "No", + i.emphasis); + fprintf(stderr,"Bitrate: "); + switch(i.vbr) + { + case MPG123_CBR: + if(i.bitrate) fprintf(stderr, "%d kbit/s", i.bitrate); + else fprintf(stderr, "%d kbit/s (free format)", (int)((double)(i.framesize+4)*8*i.rate*0.001/samples_per_frame[i.version][i.layer]+0.5)); + break; + case MPG123_VBR: fprintf(stderr, "VBR"); break; + case MPG123_ABR: fprintf(stderr, "%d kbit/s ABR", i.abr_rate); break; + default: fprintf(stderr, "???"); + } + fprintf(stderr, " Extension value: %d\n", i.flags & MPG123_PRIVATE ? 1 : 0); +} + +void print_header_compact(mpg123_handle *mh) +{ + struct mpg123_frameinfo i; + mpg123_info(mh, &i); + if(i.mode > 4 || i.mode < 0) i.mode = 4; + if(i.version > 3 || i.version < 0) i.version = 3; + if(i.layer > 3 || i.layer < 0) i.layer = 0; + + fprintf(stderr,"MPEG %s layer %s, ", versions[i.version], layers[i.layer]); + switch(i.vbr) + { + case MPG123_CBR: + if(i.bitrate) fprintf(stderr, "%d kbit/s", i.bitrate); + else fprintf(stderr, "%d kbit/s (free format)", (int)((double)i.framesize*8*i.rate*0.001/samples_per_frame[i.version][i.layer]+0.5)); + break; + case MPG123_VBR: fprintf(stderr, "VBR"); break; + case MPG123_ABR: fprintf(stderr, "%d kbit/s ABR", i.abr_rate); break; + default: fprintf(stderr, "???"); + } + fprintf(stderr,", %ld Hz %s\n", i.rate, smodes[i.mode]); +} + +#if 0 +/* removed the strndup for better portability */ +/* + * Allocate space for a new string containing the first + * "num" characters of "src". The resulting string is + * always zero-terminated. Returns NULL if malloc fails. + */ +char *strndup (const char *src, int num) +{ + char *dst; + + if (!(dst = (char *) malloc(num+1))) + return (NULL); + dst[num] = '\0'; + return (strncpy(dst, src, num)); +} +#endif + +/* + * Split "path" into directory and filename components. + * + * Return value is 0 if no directory was specified (i.e. + * "path" does not contain a '/'), OR if the directory + * is the same as on the previous call to this function. + * + * Return value is 1 if a directory was specified AND it + * is different from the previous one (if any). + */ + +int split_dir_file (const char *path, char **dname, char **fname) +{ + static char *lastdir = NULL; + char *slashpos; + + if ((slashpos = strrchr(path, '/'))) { + *fname = slashpos + 1; + *dname = strdup(path); /* , 1 + slashpos - path); */ + if(!(*dname)) { + perror("failed to allocate memory for dir name"); + return 0; + } + (*dname)[1 + slashpos - path] = 0; + if (lastdir && !strcmp(lastdir, *dname)) { + /*** same as previous directory ***/ + free (*dname); + *dname = lastdir; + return 0; + } + else { + /*** different directory ***/ + if (lastdir) + free (lastdir); + lastdir = *dname; + return 1; + } + } + else { + /*** no directory specified ***/ + if (lastdir) { + free (lastdir); + lastdir = NULL; + }; + *dname = NULL; + *fname = (char *)path; + return 0; + } +} + +unsigned int roundui(double val) +{ + double base = floor(val); + return (unsigned int) ((val-base) < 0.5 ? base : base + 1 ); +} + +void print_stat(mpg123_handle *fr, long offset, long buffsize) +{ + double tim1,tim2; + off_t rno, no; + double basevol, realvol; + char *icy; +#ifndef WIN32 +#ifndef GENERIC +/* Only generate new stat line when stderr is ready... don't overfill... */ + { + struct timeval t; + fd_set serr; + int n,errfd = fileno(stderr); + + t.tv_sec=t.tv_usec=0; + + FD_ZERO(&serr); + FD_SET(errfd,&serr); + n = select(errfd+1,NULL,&serr,NULL,&t); + if(n <= 0) return; + } +#endif +#endif + if( MPG123_OK == mpg123_position(fr, offset, buffsize, &no, &rno, &tim1, &tim2) + && MPG123_OK == mpg123_getvolume(fr, &basevol, &realvol, NULL) ) + { + fprintf(stderr, "\rFrame# %5"OFF_P" [%5"OFF_P"], Time: %02lu:%02u.%02u [%02u:%02u.%02u], RVA:%6s, Vol: %3u(%3u)", + (off_p)no, (off_p)rno, + (unsigned long) tim1/60, (unsigned int)tim1%60, (unsigned int)(tim1*100)%100, + (unsigned int)tim2/60, (unsigned int)tim2%60, (unsigned int)(tim2*100)%100, + rva_name[param.rva], roundui(basevol*100), roundui(realvol*100) ); + if(param.usebuffer) fprintf(stderr,", [%8ld] ",(long)buffsize); + } + /* Check for changed tags here too? */ + if( mpg123_meta_check(fr) & MPG123_NEW_ICY && MPG123_OK == mpg123_icy(fr, &icy) ) + fprintf(stderr, "\nICY-META: %s\n", icy); +} + +void clear_stat() +{ + fprintf(stderr, "\r \r"); +} diff --git a/deps/mpg123/src/common.h b/deps/mpg123/src/common.h new file mode 100644 index 0000000..3f1fba9 --- /dev/null +++ b/deps/mpg123/src/common.h @@ -0,0 +1,29 @@ +/* + common: anything can happen here... frame reading, output, messages + + copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Michael Hipp +*/ + +#ifndef _MPG123_COMMON_H_ +#define _MPG123_COMMON_H_ + +#include "mpg123app.h" + +void (*catchsignal(int signum, void(*handler)()))(); + +void print_header(mpg123_handle *); +void print_header_compact(mpg123_handle *); +void print_stat(mpg123_handle *fr, long offset, long buffsize); +void clear_stat(); +/* for control_generic */ +extern const char* remote_header_help; +void print_remote_header(mpg123_handle *mh); +void generic_sendmsg (const char *fmt, ...); + +int split_dir_file(const char *path, char **dname, char **fname); + +extern const char* rva_name[3]; +#endif + diff --git a/deps/mpg123/src/config.h.in b/deps/mpg123/src/config.h.in new file mode 100644 index 0000000..249fe27 --- /dev/null +++ b/deps/mpg123/src/config.h.in @@ -0,0 +1,436 @@ +/* src/config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if your architecture wants/needs/can use attribute_align_arg and + alignment checks. It is for 32bit x86... */ +#undef ABI_ALIGN_FUN + +/* Define to use proper rounding. */ +#undef ACCURATE_ROUNDING + +/* Define if building universal (internal helper macro) */ +#undef AC_APPLE_UNIVERSAL_BUILD + +/* Define if .align takes 3 for alignment of 2^3=8 bytes instead of 8. */ +#undef ASMALIGN_EXP + +/* Define if __attribute__((aligned(16))) shall be used */ +#undef CCALIGN + +/* Define if debugging is enabled. */ +#undef DEBUG + +/* The default audio output module(s) to use */ +#undef DEFAULT_OUTPUT_MODULE + +/* Define if building with dynamcally linked libmpg123 */ +#undef DYNAMIC_BUILD + +/* Define if FIFO support is enabled. */ +#undef FIFO + +/* Define if frame index should be used. */ +#undef FRAME_INDEX + +/* Define if gapless is enabled. */ +#undef GAPLESS + +/* Define to 1 if you have the header file. */ +#undef HAVE_ALC_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_ALIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_AL_ALC_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_AL_AL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_AL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_ARPA_INET_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_ASM_AUDIOIO_H + +/* Define to 1 if you have the `atoll' function. */ +#undef HAVE_ATOLL + +/* Define to 1 if you have the header file. */ +#undef HAVE_AUDIOS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_AUDIOTOOLBOX_AUDIOTOOLBOX_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_AUDIOUNIT_AUDIOUNIT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_CORESERVICES_CORESERVICES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_CULIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define if getaddrinfo accepts the AI_ADDRCONFIG flag */ +#undef HAVE_GAI_ADDRCONFIG + +/* Define to 1 if you have the `getaddrinfo' function. */ +#undef HAVE_GETADDRINFO + +/* Define to 1 if you have the `getpagesize' function. */ +#undef HAVE_GETPAGESIZE + +/* Define to 1 if you have the `getuid' function. */ +#undef HAVE_GETUID + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LANGINFO_H + +/* Define to 1 if you have the `m' library (-lm). */ +#undef HAVE_LIBM + +/* Define to 1 if you have the `mx' library (-lmx). */ +#undef HAVE_LIBMX + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIMITS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_SOUNDCARD_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LOCALE_H + +/* Define if libltdl is available */ +#undef HAVE_LTDL + +/* Define to 1 if you have the header file. */ +#undef HAVE_MACHINE_SOUNDCARD_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `mkfifo' function. */ +#undef HAVE_MKFIFO + +/* Define to 1 if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETDB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_IN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_TCP_H + +/* Define to 1 if you have the `nl_langinfo' function. */ +#undef HAVE_NL_LANGINFO + +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENAL_ALC_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENAL_AL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_OS2ME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_OS2_H + +/* Define to 1 if you have the `random' function. */ +#undef HAVE_RANDOM + +/* Define to 1 if you have the header file. */ +#undef HAVE_SCHED_H + +/* Define to 1 if you have the `sched_setscheduler' function. */ +#undef HAVE_SCHED_SETSCHEDULER + +/* Define to 1 if you have the `setlocale' function. */ +#undef HAVE_SETLOCALE + +/* Define to 1 if you have the `setpriority' function. */ +#undef HAVE_SETPRIORITY + +/* Define to 1 if you have the `setuid' function. */ +#undef HAVE_SETUID + +/* Define to 1 if you have the header file. */ +#undef HAVE_SIGNAL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SNDIO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDIO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `strdup' function. */ +#undef HAVE_STRDUP + +/* Define to 1 if you have the `strerror' function. */ +#undef HAVE_STRERROR + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SUN_AUDIOIO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_AUDIOIO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_AUDIO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_IOCTL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_RESOURCE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SIGNAL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SOCKET_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SOUNDCARD_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_WAIT_H + +/* Define this if you have the POSIX termios library */ +#undef HAVE_TERMIOS + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_WINDOWS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_WS2TCPIP_H + +/* Define to indicate that float storage follows IEEE754. */ +#undef IEEE_FLOAT + +/* size of the frame index seek table */ +#undef INDEX_SIZE + +/* Define if IPV6 support is enabled. */ +#undef IPV6 + +/* Define this to the size of long type in bits, used for LFS small/native + alias functions. */ +#undef LFS_ALIAS_BITS + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + +/* The suffix for module files. */ +#undef MODULE_FILE_SUFFIX + +/* Define if network support is enabled. */ +#undef NETWORK + +/* Define to disable 16 bit integer output. */ +#undef NO_16BIT + +/* Define to disable 32 bit and 24 bit integer output. */ +#undef NO_32BIT + +/* Define to disable 8 bit integer output. */ +#undef NO_8BIT + +/* Define to disable downsampled decoding. */ +#undef NO_DOWNSAMPLE + +/* Define to disable error messages in combination with a return value (the + return is left intact). */ +#undef NO_ERETURN + +/* Define to disable error messages. */ +#undef NO_ERRORMSG + +/* Define to disable feeder and buffered readers. */ +#undef NO_FEEDER + +/* Define to disable ICY handling. */ +#undef NO_ICY + +/* Define to disable ID3v2 parsing. */ +#undef NO_ID3V2 + +/* Define to disable layer I. */ +#undef NO_LAYER1 + +/* Define to disable layer II. */ +#undef NO_LAYER2 + +/* Define to disable layer III. */ +#undef NO_LAYER3 + +/* Define to disable ntom resampling. */ +#undef NO_NTOM + +/* Define to disable real output. */ +#undef NO_REAL + +/* Define to disable string functions. */ +#undef NO_STRING + +/* Define to disable warning messages. */ +#undef NO_WARNING + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define if portaudio v18 API is wanted. */ +#undef PORTAUDIO18 + +/* The size of `int32_t', as computed by sizeof. */ +#undef SIZEOF_INT32_T + +/* The size of `long', as computed by sizeof. */ +#undef SIZEOF_LONG + +/* The size of `off_t', as computed by sizeof. */ +#undef SIZEOF_OFF_T + +/* The size of `size_t', as computed by sizeof. */ +#undef SIZEOF_SIZE_T + +/* The size of `ssize_t', as computed by sizeof. */ +#undef SIZEOF_SSIZE_T + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define if modules are enabled */ +#undef USE_MODULES + +/* Version number of package */ +#undef VERSION + +/* Define to use Win32 named pipes */ +#undef WANT_WIN32_FIFO + +/* Define to use Win32 sockets */ +#undef WANT_WIN32_SOCKETS + +/* Define to use Unicode for Windows */ +#undef WANT_WIN32_UNICODE + +/* WinXP and above for ipv6 */ +#undef WINVER + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +# undef WORDS_BIGENDIAN +# endif +#endif + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +#undef _FILE_OFFSET_BITS + +/* Define for large files, on AIX-style hosts. */ +#undef _LARGE_FILES + +/* WinXP and above for ipv6 */ +#undef _WIN32_WINNT + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#undef inline +#endif + +/* Define to `short' if does not define. */ +#undef int16_t + +/* Define to `int' if does not define. */ +#undef int32_t + +/* Define to `long int' if does not define. */ +#undef off_t + +/* Define to `unsigned long' if does not define. */ +#undef size_t + +/* Define to `long' if does not define. */ +#undef ssize_t + +/* Define to `unsigned short' if does not define. */ +#undef uint16_t + +/* Define to `unsigned int' if does not define. */ +#undef uint32_t + +/* Define to `unsigned long' if does not define. */ +#undef uintptr_t diff --git a/deps/mpg123/src/control_generic.c b/deps/mpg123/src/control_generic.c new file mode 100644 index 0000000..3620840 --- /dev/null +++ b/deps/mpg123/src/control_generic.c @@ -0,0 +1,809 @@ +/* + control_generic.c: control interface for frontends and real console warriors + + copyright 1997-99,2004-8 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Andreas Neuhaus and Michael Hipp + reworked by Thomas Orgis - it was the entry point for eventually becoming maintainer... +*/ + +#include "mpg123app.h" +#include +#include +#if !defined (WIN32) || defined (__CYGWIN__) +#include +#include +#endif +#include +#include +#include + +#include "common.h" +#include "buffer.h" +#include "genre.h" +#include "playlist.h" +#define MODE_STOPPED 0 +#define MODE_PLAYING 1 +#define MODE_PAUSED 2 + +extern int buffer_pid; +extern audio_output_t *ao; + +#ifdef FIFO +#include +int control_file = STDIN_FILENO; +#else +#define control_file STDIN_FILENO +#ifdef WANT_WIN32_FIFO +#error Control interface does not work on win32 stdin +#endif /* WANT_WIN32_FIFO */ +#endif +FILE *outstream; +static int mode = MODE_STOPPED; +static int init = 0; + +#include "debug.h" + +void generic_sendmsg (const char *fmt, ...) +{ + va_list ap; + fprintf(outstream, "@"); + va_start(ap, fmt); + vfprintf(outstream, fmt, ap); + va_end(ap); + fprintf(outstream, "\n"); +} + +/* Split up a number of lines separated by \n, \r, both or just zero byte + and print out each line with specified prefix. */ +static void generic_send_lines(const char* fmt, mpg123_string *inlines) +{ + size_t i; + int hadcr = 0, hadlf = 0; + char *lines = NULL; + char *line = NULL; + size_t len = 0; + + if(inlines != NULL && inlines->fill) + { + lines = inlines->p; + len = inlines->fill; + } + else return; + + line = lines; + for(i=0; ititle, 30); + memcpy(info+30, v1->artist, 30); + memcpy(info+60, v1->album, 30); + memcpy(info+90, v1->year, 4); + memcpy(info+94, v1->comment, 30); + + for(i=0;i<124; ++i) if(info[i] == 0) info[i] = ' '; + info[i] = 0; + generic_sendmsg("%s ID3:%s%s", prefix, info, (v1->genre<=genre_count) ? genre_table[v1->genre] : "Unknown"); + generic_sendmsg("%s ID3.genre:%i", prefix, v1->genre); + if(v1->comment[28] == 0 && v1->comment[29] != 0) + generic_sendmsg("%s ID3.track:%i", prefix, (unsigned char)v1->comment[29]); +} + +static void generic_sendinfoid3(mpg123_handle *mh) +{ + mpg123_id3v1 *v1; + mpg123_id3v2 *v2; + if(MPG123_OK != mpg123_id3(mh, &v1, &v2)) + { + error1("Cannot get ID3 data: %s", mpg123_strerror(mh)); + return; + } + if(v1 != NULL) + { + generic_sendv1(v1, "I"); + } + if(v2 != NULL) + { + generic_send_lines("I ID3v2.title:%s", v2->title); + generic_send_lines("I ID3v2.artist:%s", v2->artist); + generic_send_lines("I ID3v2.album:%s", v2->album); + generic_send_lines("I ID3v2.year:%s", v2->year); + generic_send_lines("I ID3v2.comment:%s", v2->comment); + generic_send_lines("I ID3v2.genre:%s", v2->genre); + } +} + +void generic_sendalltag(mpg123_handle *mh) +{ + mpg123_id3v1 *v1; + mpg123_id3v2 *v2; + generic_sendmsg("T {"); + if(MPG123_OK != mpg123_id3(mh, &v1, &v2)) + { + error1("Cannot get ID3 data: %s", mpg123_strerror(mh)); + v2 = NULL; + v1 = NULL; + } + if(v1 != NULL) generic_sendv1(v1, "T"); + + if(v2 != NULL) + { + size_t i; + for(i=0; itexts; ++i) + { + char id[5]; + memcpy(id, v2->text[i].id, 4); + id[4] = 0; + generic_sendmsg("T ID3v2.%s:", id); + generic_send_lines("T =%s", &v2->text[i].text); + } + for(i=0; iextras; ++i) + { + char id[5]; + memcpy(id, v2->extra[i].id, 4); + id[4] = 0; + generic_sendmsg("T ID3v2.%s desc(%s):", + id, + v2->extra[i].description.fill ? v2->extra[i].description.p : "" ); + generic_send_lines("T =%s", &v2->extra[i].text); + } + for(i=0; icomments; ++i) + { + char id[5]; + char lang[4]; + memcpy(id, v2->comment_list[i].id, 4); + id[4] = 0; + memcpy(lang, v2->comment_list[i].lang, 3); + lang[3] = 0; + generic_sendmsg("T ID3v2.%s lang(%s) desc(%s):", + id, lang, + v2->comment_list[i].description.fill ? v2->comment_list[i].description.p : ""); + generic_send_lines("T =%s", &v2->comment_list[i].text); + } + } + generic_sendmsg("T }"); +} + +void generic_sendinfo (char *filename) +{ + char *s, *t; + s = strrchr(filename, '/'); + if (!s) + s = filename; + else + s++; + t = strrchr(s, '.'); + if (t) + *t = 0; + generic_sendmsg("I %s", s); +} + +static void generic_load(mpg123_handle *fr, char *arg, int state) +{ + if(param.usebuffer) + { + buffer_resync(); + if(mode == MODE_PAUSED && state != MODE_PAUSED) buffer_start(); + } + if(mode != MODE_STOPPED) + { + close_track(); + mode = MODE_STOPPED; + } + if(!open_track(arg)) + { + generic_sendmsg("E Error opening stream: %s", arg); + generic_sendmsg("P 0"); + return; + } + mpg123_seek(fr, 0, SEEK_SET); /* This finds ID3v2 at beginning. */ + if(mpg123_meta_check(fr) & MPG123_NEW_ID3) + { + generic_sendinfoid3(fr); + mpg123_meta_free(fr); + } + else generic_sendinfo(arg); + + if(htd.icy_name.fill) generic_sendmsg("I ICY-NAME: %s", htd.icy_name.p); + if(htd.icy_url.fill) generic_sendmsg("I ICY-URL: %s", htd.icy_url.p); + + mode = state; + init = 1; + generic_sendmsg(mode == MODE_PAUSED ? "P 1" : "P 2"); +} + +static void generic_loadlist(mpg123_handle *fr, char *arg) +{ + /* arguments are two: first the index to play, then the URL */ + long entry; + long i = 0; + char *file = NULL; + char *thefile = NULL; + + /* I feel retarted with string parsing outside Perl. */ + while(*arg && isspace(*arg)) ++arg; + entry = atol(arg); + while(*arg && !isspace(*arg)) ++arg; + while(*arg && isspace(*arg)) ++arg; + if(!*arg) + { + generic_sendmsg("E empty list name"); + return; + } + + /* Now got the plain playlist path in arg. On to evil manupulation of mpg123's playlist code. */ + param.listname = arg; + param.listentry = 0; /* The playlist shall not filter. */ + prepare_playlist(0, NULL); + while((file = get_next_file())) + { + ++i; + /* semantics: 0 brings you to the last track */ + if(entry == 0 || entry == i) thefile = file; + + generic_sendmsg("I LISTENTRY %li: %s", i, file); + } + if(!i) generic_sendmsg("I LIST EMPTY"); + + /* If we have something to play, play it. */ + if(thefile) generic_load(fr, thefile, MODE_PLAYING); + + free_playlist(); /* Free memory after it is not needed anymore. */ +} + +int control_generic (mpg123_handle *fr) +{ + struct timeval tv; + fd_set fds; + int n; + + /* ThOr */ + char alive = 1; + char silent = 0; + + /* responses to stderr for frontends needing audio data from stdout */ + if (param.remote_err) + outstream = stderr; + else + outstream = stdout; + +#ifndef WIN32 + setlinebuf(outstream); +#else /* perhaps just use setvbuf as it's C89 */ + /* + fprintf(outstream, "You are on Win32 and want to use the control interface... tough luck: We need a replacement for select on STDIN first.\n"); + return 0; + setvbuf(outstream, (char*)NULL, _IOLBF, 0); + */ +#endif + /* the command behaviour is different, so is the ID */ + /* now also with version for command availability */ + fprintf(outstream, "@R MPG123 (ThOr) v7\n"); +#ifdef FIFO + if(param.fifo) + { + if(param.fifo[0] == 0) + { + error("You wanted an empty FIFO name??"); + return 1; + } +#ifndef WANT_WIN32_FIFO + unlink(param.fifo); + if(mkfifo(param.fifo, 0666) == -1) + { + error2("Failed to create FIFO at %s (%s)", param.fifo, strerror(errno)); + return 1; + } + debug("going to open named pipe ... blocking until someone gives command"); +#endif /* WANT_WIN32_FIFO */ +#ifdef WANT_WIN32_FIFO + control_file = win32_fifo_mkfifo(param.fifo); +#else + control_file = open(param.fifo,O_RDONLY); +#endif /* WANT_WIN32_FIFO */ + debug("opened"); + } +#endif + + while (alive) + { + tv.tv_sec = 0; + tv.tv_usec = 0; + FD_ZERO(&fds); + FD_SET(control_file, &fds); + /* play frame if no command needs to be processed */ + if (mode == MODE_PLAYING) { +#ifdef WANT_WIN32_FIFO + n = win32_fifo_read_peek(&tv); +#else + n = select(32, &fds, NULL, NULL, &tv); +#endif + if (n == 0) { + if (!play_frame()) + { + /* When the track ended, user may want to keep it open (to seek back), + so there is a decision between stopping and pausing at the end. */ + if(param.keep_open) + { + mode = MODE_PAUSED; + /* Hm, buffer should be stopped already, shouldn't it? */ + if(param.usebuffer) buffer_stop(); + generic_sendmsg("P 1"); + } + else + { + mode = MODE_STOPPED; + close_track(); + generic_sendmsg("P 0"); + } + continue; + } + if (init) { + print_remote_header(fr); + init = 0; + } + if(silent == 0) + { + generic_sendstat(fr); + if(mpg123_meta_check(fr) & MPG123_NEW_ICY) + { + char *meta; + if(mpg123_icy(fr, &meta) == MPG123_OK) + generic_sendmsg("I ICY-META: %s", meta != NULL ? meta : ""); + } + } + } + } + else { + /* wait for command */ + while (1) { +#ifdef WANT_WIN32_FIFO + n = win32_fifo_read_peek(NULL); +#else + n = select(32, &fds, NULL, NULL, NULL); +#endif + if (n > 0) + break; + } + } + + /* on error */ + if (n < 0) { + fprintf(stderr, "Error waiting for command: %s\n", strerror(errno)); + return 1; + } + + /* read & process commands */ + if (n > 0) + { + short int len = 1; /* length of buffer */ + char *cmd, *arg; /* variables for parsing, */ + char *comstr = NULL; /* gcc thinks that this could be used uninitialited... */ + char buf[REMOTE_BUFFER_SIZE]; + short int counter; + char *next_comstr = buf; /* have it initialized for first command */ + + /* read as much as possible, maybe multiple commands */ + /* When there is nothing to read (EOF) or even an error, it is the end */ +#ifdef WANT_WIN32_FIFO + len = win32_fifo_read(buf,REMOTE_BUFFER_SIZE); +#else + len = read(control_file, buf, REMOTE_BUFFER_SIZE); +#endif + if(len < 1) + { +#ifdef FIFO + if(len == 0 && param.fifo) + { + debug("fifo ended... reopening"); +#ifdef WANT_WIN32_FIFO + win32_fifo_mkfifo(param.fifo); +#else + close(control_file); + control_file = open(param.fifo,O_RDONLY|O_NONBLOCK); +#endif + if(control_file < 0){ error1("open of fifo failed... %s", strerror(errno)); break; } + continue; + } +#endif + if(len < 0) error1("command read error: %s", strerror(errno)); + break; + } + + debug1("read %i bytes of commands", len); + /* one command on a line - separation by \n -> C strings in a row */ + for(counter = 0; counter < len; ++counter) + { + /* line end is command end */ + if( (buf[counter] == '\n') || (buf[counter] == '\r') ) + { + debug1("line end at counter=%i", counter); + buf[counter] = 0; /* now it's a properly ending C string */ + comstr = next_comstr; + + /* skip the additional line ender of \r\n or \n\r */ + if( (counter < (len - 1)) && ((buf[counter+1] == '\n') || (buf[counter+1] == '\r')) ) buf[++counter] = 0; + + /* next "real" char is first of next command */ + next_comstr = buf + counter+1; + + /* directly process the command now */ + debug1("interpreting command: %s", comstr); + if(strlen(comstr) == 0) continue; + + /* PAUSE */ + if (!strcasecmp(comstr, "P") || !strcasecmp(comstr, "PAUSE")) { + if(mode != MODE_STOPPED) + { + if (mode == MODE_PLAYING) { + mode = MODE_PAUSED; + if(param.usebuffer) buffer_stop(); + generic_sendmsg("P 1"); + } else { + mode = MODE_PLAYING; + if(param.usebuffer) buffer_start(); + generic_sendmsg("P 2"); + } + } else generic_sendmsg("P 0"); + continue; + } + + /* STOP */ + if (!strcasecmp(comstr, "S") || !strcasecmp(comstr, "STOP")) { + if (mode != MODE_STOPPED) { + if(param.usebuffer) + { + buffer_stop(); + buffer_resync(); + } + close_track(); + mode = MODE_STOPPED; + generic_sendmsg("P 0"); + } else generic_sendmsg("P 0"); + continue; + } + + /* SILENCE */ + if(!strcasecmp(comstr, "SILENCE")) { + silent = 1; + generic_sendmsg("silence"); + continue; + } + + if(!strcasecmp(comstr, "T") || !strcasecmp(comstr, "TAG")) { + generic_sendalltag(fr); + continue; + } + + if(!strcasecmp(comstr, "SCAN")) + { + if(mode != MODE_STOPPED) + { + if(mpg123_scan(fr) == MPG123_OK) + generic_sendmsg("SCAN done"); + else + generic_sendmsg("E %s", mpg123_strerror(fr)); + } + else generic_sendmsg("E No track loaded!"); + + continue; + } + + if(!strcasecmp(comstr, "SAMPLE")) + { + off_t pos = mpg123_tell(fr); + off_t len = mpg123_length(fr); + /* I need to have portable printf specifiers that do not truncate the type... more autoconf... */ + if(len < 0) generic_sendmsg("E %s", mpg123_strerror(fr)); + else generic_sendmsg("SAMPLE %li %li", (long)pos, (long)len); + continue; + } + + if(!strcasecmp(comstr, "SHOWEQ")) + { + int i; + generic_sendmsg("SHOWEQ {"); + for(i=0; i<32; ++i) + { + generic_sendmsg("SHOWEQ %i : %i : %f", MPG123_LEFT, i, mpg123_geteq(fr, MPG123_LEFT, i)); + generic_sendmsg("SHOWEQ %i : %i : %f", MPG123_RIGHT, i, mpg123_geteq(fr, MPG123_RIGHT, i)); + } + generic_sendmsg("SHOWEQ }"); + continue; + } + + if(!strcasecmp(comstr, "STATE")) + { + long val; + generic_sendmsg("STATE {"); + /* Get some state information bits and display them. */ + if(mpg123_getstate(fr, MPG123_ACCURATE, &val, NULL) == MPG123_OK) + generic_sendmsg("STATE accurate %li", val); + + generic_sendmsg("STATE }"); + continue; + } + + /* QUIT */ + if (!strcasecmp(comstr, "Q") || !strcasecmp(comstr, "QUIT")){ + alive = FALSE; continue; + } + + /* some HELP */ + if (!strcasecmp(comstr, "H") || !strcasecmp(comstr, "HELP")) { + generic_sendmsg("H {"); + generic_sendmsg("H HELP/H: command listing (LONG/SHORT forms), command case insensitve"); + generic_sendmsg("H LOAD/L : load and start playing resource "); + generic_sendmsg("H LOADPAUSED/LP : load but do not start playing resource "); + generic_sendmsg("H LOADLIST : load a playlist from given , and display its entries, optionally load and play one of these specificed by the integer (<0: just list, 0: play last track, >0:play track with that position in list)"); + generic_sendmsg("H PAUSE/P: pause playback"); + generic_sendmsg("H STOP/S: stop playback (closes file)"); + generic_sendmsg("H JUMP/J |<+offset>|<-offset>|<[+|-]seconds>s: jump to mpeg frame or change position by offset, same in seconds if number followed by \"s\""); + generic_sendmsg("H VOLUME/V : set volume in % (0..100...); float value"); + generic_sendmsg("H RVA off|(mix|radio)|(album|audiophile): set rva mode"); + generic_sendmsg("H EQ/E : set equalizer value for frequency band 0 to 31 on channel %i (left) or %i (right) or %i (both)", MPG123_LEFT, MPG123_RIGHT, MPG123_LR); + generic_sendmsg("H EQFILE : load EQ settings from a file"); + generic_sendmsg("H SHOWEQ: show all equalizer settings (as lines in a SHOWEQ block (like TAG))"); + generic_sendmsg("H SEEK/K |<+offset>|<-offset>: jump to output sample position or change position by offset"); + generic_sendmsg("H SCAN: scan through the file, building seek index"); + generic_sendmsg("H SAMPLE: print out the sample position and total number of samples"); + generic_sendmsg("H SEQ : simple eq setting..."); + generic_sendmsg("H PITCH <[+|-]value>: adjust playback speed (+0.01 is 1 %% faster)"); + generic_sendmsg("H SILENCE: be silent during playback (meaning silence in text form)"); + generic_sendmsg("H STATE: Print auxiliary state info in several lines (just try it to see what info is there)."); + generic_sendmsg("H TAG/T: Print all available (ID3) tag info, for ID3v2 that gives output of all collected text fields, using the ID3v2.3/4 4-character names."); + generic_sendmsg("H The output is multiple lines, begin marked by \"@T {\", end by \"@T }\"."); + generic_sendmsg("H ID3v1 data is like in the @I info lines (see below), just with \"@T\" in front."); + generic_sendmsg("H An ID3v2 data field is introduced via ([ ... ] means optional):"); + generic_sendmsg("H @T ID3v2.[ [lang()] desc()]:"); + generic_sendmsg("H The lines of data follow with \"=\" prefixed:"); + generic_sendmsg("H @T ="); + generic_sendmsg("H meaning of the @S stream info:"); + generic_sendmsg("H %s", remote_header_help); + generic_sendmsg("H The @I lines after loading a track give some ID3 info, the format:"); + generic_sendmsg("H @I ID3:artist album year comment genretext"); + generic_sendmsg("H where artist,album and comment are exactly 30 characters each, year is 4 characters, genre text unspecified."); + generic_sendmsg("H You will encounter \"@I ID3.genre:\" and \"@I ID3.track:\"."); + generic_sendmsg("H Then, there is an excerpt of ID3v2 info in the structure"); + generic_sendmsg("H @I ID3v2.title:Blabla bla Bla"); + generic_sendmsg("H for every line of the \"title\" data field. Likewise for other fields (author, album, etc)."); + generic_sendmsg("H }"); + continue; + } + + /* commands with arguments */ + cmd = NULL; + arg = NULL; + cmd = strtok(comstr," \t"); /* get the main command */ + arg = strtok(NULL,""); /* get the args */ + + if (cmd && strlen(cmd) && arg && strlen(arg)) + { + /* Simple EQ: SEQ */ + if (!strcasecmp(cmd, "SEQ")) { + double b,m,t; + int cn; + if(sscanf(arg, "%lf %lf %lf", &b, &m, &t) == 3) + { + /* Consider adding mpg123_seq()... but also, on could define a nicer courve for that. */ + if ((t >= 0) && (t <= 3)) + for(cn=0; cn < 1; ++cn) mpg123_eq(fr, MPG123_LEFT|MPG123_RIGHT, cn, b); + + if ((m >= 0) && (m <= 3)) + for(cn=1; cn < 2; ++cn) mpg123_eq(fr, MPG123_LEFT|MPG123_RIGHT, cn, m); + + if ((b >= 0) && (b <= 3)) + for(cn=2; cn < 32; ++cn) mpg123_eq(fr, MPG123_LEFT|MPG123_RIGHT, cn, t); + + generic_sendmsg("bass: %f mid: %f treble: %f", b, m, t); + } + else generic_sendmsg("E invalid arguments for SEQ: %s", arg); + continue; + } + + /* Equalizer control :) (JMG) */ + if (!strcasecmp(cmd, "E") || !strcasecmp(cmd, "EQ")) { + double e; /* ThOr: equalizer is of type real... whatever that is */ + int c, v; + /*generic_sendmsg("%s",updown);*/ + if(sscanf(arg, "%i %i %lf", &c, &v, &e) == 3) + { + if(mpg123_eq(fr, c, v, e) == MPG123_OK) + generic_sendmsg("%i : %i : %f", c, v, e); + else + generic_sendmsg("E failed to set eq: %s", mpg123_strerror(fr)); + } + else generic_sendmsg("E invalid arguments for EQ: %s", arg); + continue; + } + + if(!strcasecmp(cmd, "EQFILE")) + { + equalfile = arg; + if(load_equalizer(fr) == 0) + generic_sendmsg("EQFILE done"); + else + generic_sendmsg("E failed to parse given eq file"); + + continue; + } + + /* SEEK to a sample offset */ + if(!strcasecmp(cmd, "K") || !strcasecmp(cmd, "SEEK")) + { + off_t soff; + char *spos = arg; + int whence = SEEK_SET; + if(mode == MODE_STOPPED) + { + generic_sendmsg("E No track loaded!"); + continue; + } + + soff = (off_t) atobigint(spos); + if(spos[0] == '-' || spos[0] == '+') whence = SEEK_CUR; + if(0 > (soff = mpg123_seek(fr, soff, whence))) + { + generic_sendmsg("E Error while seeking: %s", mpg123_strerror(fr)); + mpg123_seek(fr, 0, SEEK_SET); + } + if(param.usebuffer) buffer_resync(); + + generic_sendmsg("K %li", (long)mpg123_tell(fr)); + continue; + } + /* JUMP */ + if (!strcasecmp(cmd, "J") || !strcasecmp(cmd, "JUMP")) { + char *spos; + off_t offset; + double secs; + + spos = arg; + if(mode == MODE_STOPPED) + { + generic_sendmsg("E No track loaded!"); + continue; + } + + if(spos[strlen(spos)-1] == 's' && sscanf(arg, "%lf", &secs) == 1) offset = mpg123_timeframe(fr, secs); + else offset = atol(spos); + /* totally replaced that stuff - it never fully worked + a bit usure about why +pos -> spos+1 earlier... */ + if (spos[0] == '-' || spos[0] == '+') offset += framenum; + + if(0 > (framenum = mpg123_seek_frame(fr, offset, SEEK_SET))) + { + generic_sendmsg("E Error while seeking"); + mpg123_seek_frame(fr, 0, SEEK_SET); + } + if(param.usebuffer) buffer_resync(); + + generic_sendmsg("J %d", framenum); + continue; + } + + /* VOLUME in percent */ + if(!strcasecmp(cmd, "V") || !strcasecmp(cmd, "VOLUME")) + { + double v; + mpg123_volume(fr, atof(arg)/100); + mpg123_getvolume(fr, &v, NULL, NULL); /* Necessary? */ + generic_sendmsg("V %f%%", v * 100); + continue; + } + + /* PITCH (playback speed) in percent */ + if(!strcasecmp(cmd, "PITCH")) + { + double p; + if(sscanf(arg, "%lf", &p) == 1) + { + set_pitch(fr, ao, p); + generic_sendmsg("PITCH %f", param.pitch); + } + else generic_sendmsg("E invalid arguments for PITCH: %s", arg); + continue; + } + + /* RVA mode */ + if(!strcasecmp(cmd, "RVA")) + { + if(!strcasecmp(arg, "off")) param.rva = MPG123_RVA_OFF; + else if(!strcasecmp(arg, "mix") || !strcasecmp(arg, "radio")) param.rva = MPG123_RVA_MIX; + else if(!strcasecmp(arg, "album") || !strcasecmp(arg, "audiophile")) param.rva = MPG123_RVA_ALBUM; + mpg123_volume_change(fr, 0.); + generic_sendmsg("RVA %s", rva_name[param.rva]); + continue; + } + + /* LOAD - actually play */ + if (!strcasecmp(cmd, "L") || !strcasecmp(cmd, "LOAD")){ generic_load(fr, arg, MODE_PLAYING); continue; } + + if (!strcasecmp(cmd, "L") || !strcasecmp(cmd, "LOADLIST")){ generic_loadlist(fr, arg); continue; } + + /* LOADPAUSED */ + if (!strcasecmp(cmd, "LP") || !strcasecmp(cmd, "LOADPAUSED")){ generic_load(fr, arg, MODE_PAUSED); continue; } + + /* no command matched */ + generic_sendmsg("E Unknown command: %s", cmd); /* unknown command */ + } /* end commands with arguments */ + else generic_sendmsg("E Unknown command or no arguments: %s", comstr); /* unknown command */ + + } /* end of single command processing */ + } /* end of scanning the command buffer */ + + /* + when last command had no \n... should I discard it? + Ideally, I should remember the part and wait for next + read() to get the rest up to a \n. But that can go + to infinity. Too long commands too quickly are just + bad. Cannot/Won't change that. So, discard the unfinished + command and have fingers crossed that the rest of this + unfinished one qualifies as "unknown". + */ + if(buf[len-1] != 0) + { + char lasti = buf[len-1]; + buf[len-1] = 0; + generic_sendmsg("E Unfinished command: %s%c", comstr, lasti); + } + } /* end command reading & processing */ + } /* end main (alive) loop */ + debug("going to end"); + /* quit gracefully */ +#ifndef NOXFERMEM + if (param.usebuffer) { + kill(buffer_pid, SIGINT); + xfermem_done_writer(buffermem); + waitpid(buffer_pid, NULL, 0); + xfermem_done(buffermem); + } +#endif + debug("closing control"); +#ifdef FIFO +#if WANT_WIN32_FIFO + win32_fifo_close(); +#else + close(control_file); /* be it FIFO or STDIN */ + if(param.fifo) unlink(param.fifo); +#endif /* WANT_WIN32_FIFO */ +#endif + debug("control_generic returning"); + return 0; +} + +/* EOF */ diff --git a/deps/mpg123/src/equalizer.c b/deps/mpg123/src/equalizer.c new file mode 100644 index 0000000..ecce78b --- /dev/null +++ b/deps/mpg123/src/equalizer.c @@ -0,0 +1,48 @@ +/* + equalizer: code for loading equalizer settings + + copyright 1995-2008 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Michael Hipp (exported to this file by Thomas Orgis) +*/ + +#include "mpg123app.h" + +/* Load the settings from the path in the global variable equalfile. + If there is no file, restore equalizer defaults. */ +int load_equalizer(mpg123_handle *mh) +{ + if(equalfile != NULL) + { /* tst; ThOr: not TRUE or FALSE: allocated or not... */ + FILE *fe; + int i; + fe = fopen(equalfile,"r"); + if(fe) { + char line[256]; + for(i=0;i<32;i++) { + float e0 = 1.0; + float e1 = 1.0; /* %f -> float! */ + do /* ignore comments */ + { + line[0]=0; + fgets(line,255,fe); + } + while(line[0]=='#'); + /* Hm, why not use fscanf? Comments... */ + sscanf(line,"%f %f",&e0,&e1); + /* If scanning failed, we have default 1.0 value. */ + mpg123_eq(mh, MPG123_LEFT, i, e0); + mpg123_eq(mh, MPG123_RIGHT, i, e1); + } + fclose(fe); + } + else + { + fprintf(stderr,"Can't open equalizer file '%s'\n",equalfile); + return -1; + } + } + else mpg123_reset_eq(mh); + + return 0; +} diff --git a/deps/mpg123/src/genre.c b/deps/mpg123/src/genre.c new file mode 100644 index 0000000..f820d38 --- /dev/null +++ b/deps/mpg123/src/genre.c @@ -0,0 +1,271 @@ +/* + genre: id3 genre definition + + copyright ?-2007 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Shane Wegner +*/ + +char *genre_table[] = +{ + "Blues", + "Classic Rock", + "Country", + "Dance", + "Disco", + "Funk", + "Grunge", + "Hip-Hop", + "Jazz", + "Metal", + "New Age", + "Oldies", + "Other", + "Pop", + "R&B", + "Rap", + "Reggae", + "Rock", + "Techno", + "Industrial", + "Alternative", + "Ska", + "Death Metal", + "Pranks", + "Soundtrack", + "Euro-Techno", + "Ambient", + "Trip-Hop", + "Vocal", + "Jazz+Funk", + "Fusion", + "Trance", + "Classical", + "Instrumental", + "Acid", + "House", + "Game", + "Sound Clip", + "Gospel", + "Noise", + "AlternRock", + "Bass", + "Soul", + "Punk", + "Space", + "Meditative", + "Instrumental Pop", + "Instrumental Rock", + "Ethnic", + "Gothic", + "Darkwave", + "Techno-Industrial", + "Electronic", + "Pop-Folk", + "Eurodance", + "Dream", + "Southern Rock", + "Comedy", + "Cult", + "Gangsta", + "Top 40", + "Christian Rap", + "Pop/Funk", + "Jungle", + "Native American", + "Cabaret", + "New Wave", + "Psychedelic", + "Rave", + "Showtunes", + "Trailer", + "Lo-Fi", + "Tribal", + "Acid Punk", + "Acid Jazz", + "Polka", + "Retro", + "Musical", + "Rock & Roll", + "Hard Rock", + "Folk", + "Folk/Rock", + "National folk", + "Swing", + "Fast-fusion", + "Bebob", + "Latin", + "Revival", + "Celtic", + "Bluegrass", + "Avantgarde", + "Gothic Rock", + "Progressive Rock", + "Psychedelic Rock", + "Symphonic Rock", + "Slow Rock", + "Big Band", + "Chorus", + "Easy Listening", + "Acoustic", + "Humour", + "Speech", + "Chanson", + "Opera", + "Chamber Music", + "Sonata", + "Symphony", + "Booty Bass", + "Primus", + "Porn Groove", + "Satire", + "Slow Jam", + "Club", + "Tango", + "Samba", + "Folklore", + "Ballad", + "Powder Ballad", + "Rhythmic Soul", + "Freestyle", + "Duet", + "Punk Rock", + "Drum Solo", + "A Capella", + "Euro-House", + "Dance Hall", + "Goa", + "Drum & Bass", + "Club House", + "Hardcore", + "Terror", + "Indie", + "BritPop", + "NegerPunk", + "Polsk Punk", + "Beat", + "Christian Gangsta", + "Heavy Metal", + "Black Metal", + "Crossover", + "Contemporary C", + "Christian Rock", + "Merengue", + "Salsa", + "Thrash Metal", + "Anime", + "JPop", + "SynthPop" +/* , + "Unknown", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" +*/ +}; + +const int genre_count = ((int)(sizeof(genre_table)/sizeof(char*))-1); diff --git a/deps/mpg123/src/genre.h b/deps/mpg123/src/genre.h new file mode 100644 index 0000000..0a493d0 --- /dev/null +++ b/deps/mpg123/src/genre.h @@ -0,0 +1,15 @@ +/* + genre: id3 genre definition + + copyright ?-2007 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Shane Wegner +*/ + +#ifndef _MPG123_GENRE_H_ +#define _MPG123_GENRE_H_ + +extern char *genre_table[]; +extern const int genre_count; + +#endif diff --git a/deps/mpg123/src/getlopt.c b/deps/mpg123/src/getlopt.c new file mode 100644 index 0000000..2296886 --- /dev/null +++ b/deps/mpg123/src/getlopt.c @@ -0,0 +1,148 @@ +/* + getlopt: command line option/parameter parsing + + copyright ?-2008 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written Oliver Fromme + old timestamp: Tue Apr 8 07:15:13 MET DST 1997 +*/ + +#include +#include "config.h" +#include "getlopt.h" +#include "compat.h" +#include "debug.h" + +int loptind = 1; /* index in argv[] */ +int loptchr = 0; /* index in argv[loptind] */ +char *loptarg; /* points to argument if present, else to option */ + +topt *findopt (int islong, char *opt, topt *opts) +{ + if (!opts) + return (0); + while (opts->lname) { + if (islong) { + if (!strcmp(opts->lname, opt)) + return (opts); + } + else + if (opts->sname == *opt) + return (opts); + opts++; + } + return (0); +} + +int performoption (int argc, char *argv[], topt *opt) +{ + int result = GLO_CONTINUE; + /* this really is not supposed to happen, so the exit may be justified to create asap ficing pressure */ + #define prog_error() \ + { \ + fprintf(stderr, __FILE__ ":%i Option without type flag! This is a programming error! Developer: fix this ASAP to regain your honor.\n", __LINE__); \ + exit(1); \ + } + + if (!(opt->flags & GLO_ARG)) { /* doesn't take argument */ + if (opt->var) { + if (opt->flags & GLO_CHAR) /* var is *char */ + { + debug1("char at %p", opt->var); + *((char *) opt->var) = (char) opt->value;\ + } + else if(opt->flags & GLO_LONG) + { + debug1("long at %p", opt->var); + *( (long *) opt->var ) = opt->value; + } + else if(opt->flags & GLO_INT) + { + debug1("int at %p", opt->var); + *( (int *) opt->var ) = (int) opt->value; + } + /* GLO_DOUBLE is not supported here */ + else prog_error(); + + debug("casting assignment done"); + } + else + result = opt->value ? opt->value : opt->sname; + } + else { /* requires argument */ + if (loptind >= argc) + return (GLO_NOARG); + loptarg = argv[loptind++]+loptchr; + loptchr = 0; + if (opt->var) { + if (opt->flags & GLO_CHAR) /* var is *char */ + *((char **) opt->var) = strdup(loptarg); /* valgrind claims lost memory here */ + else if(opt->flags & GLO_LONG) + *((long *) opt->var) = atol(loptarg); + else if(opt->flags & GLO_INT) + *((int *) opt->var) = atoi(loptarg); + else if(opt->flags & GLO_DOUBLE) + *((double *) opt->var) = atof(loptarg); + else prog_error(); + } + else + result = opt->value ? opt->value : opt->sname; + } + if (opt->func) + opt->func(loptarg); + return (result); +} + +int getsingleopt (int argc, char *argv[], topt *opts) +{ + char *thisopt; + topt *opt; + static char shortopt[2] = {0, 0}; + + if (loptind >= argc) + return (GLO_END); + thisopt = argv[loptind]; + debug1("getsingleopt: %s", thisopt); + if (!loptchr) { /* start new option string */ + if (thisopt[0] != '-' || !thisopt[1]) /* no more options */ + return (GLO_END); + if (thisopt[1] == '-') { /* "--" */ + if (thisopt[2]) { /* long option */ + loptarg = thisopt+2; + loptind++; + if (!(opt = findopt(1, thisopt+2, opts))) + return (GLO_UNKNOWN); + else + return (performoption(argc, argv, opt)); + } + else { /* "--" == end of options */ + loptind++; + return (GLO_END); + } + } + else /* start short option(s) */ + loptchr = 1; + } + shortopt[0] = thisopt[loptchr]; + loptarg = shortopt; + opt = findopt(0, thisopt+(loptchr++), opts); + if (!thisopt[loptchr]) { + loptind++; + loptchr = 0; + } + if (!opt) + return (GLO_UNKNOWN); + else + return (performoption(argc, argv, opt)); +} + +int getlopt (int argc, char *argv[], topt *opts) +{ + + int result; + + while ((result = getsingleopt(argc, argv, opts)) == GLO_CONTINUE); + return (result); +} + +/* EOF */ diff --git a/deps/mpg123/src/getlopt.h b/deps/mpg123/src/getlopt.h new file mode 100644 index 0000000..3fca39c --- /dev/null +++ b/deps/mpg123/src/getlopt.h @@ -0,0 +1,77 @@ +/* + getlopt: command line option/parameter parsing + + copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written Oliver Fromme + old timestamp: Tue Apr 8 07:13:39 MET DST 1997 +*/ + +#include +#include + + +#ifndef _MPG123_GETLOPT_H_ +#define _MPG123_GETLOPT_H_ + +extern int loptind; /* index in argv[] */ +extern int loptchr; /* index in argv[loptind] */ +extern char *loptarg; /* points to argument if present, else to option */ + +typedef struct { + char sname; /* short option name, can be 0 */ + char *lname; /* long option name, can be 0 */ + int flags; /* see below */ + void (*func)(char *); /* called if != 0 (after setting of var) */ + void *var; /* type is *long, *char or **char, see below */ + long value; +} topt; + +/* ThOr: make this clear; distict long from int (since this is != on my Alpha) and really use a flag for every case (spare the 0 case +for .... no flag) */ +#define GLO_ARG 1 +#define GLO_CHAR 2 +#define GLO_INT 4 +#define GLO_LONG 8 +#define GLO_DOUBLE 16 + +/* flags: + * bit 0 = 0 - no argument + * if var != NULL + * *var := value or (char)value [see bit 1] + * else + * loptarg = &option + * return ((value != 0) ? value : sname) + * bit 0 = 1 - argument required + * if var != NULL + * *var := atoi(arg) or strdup(arg) [see bit 1] + * else + * loptarg = &arg + * return ((value != 0) ? value : sname) + * + * bit 1 = 1 - var is a pointer to a char (or string), + * and value is interpreted as char + * bit 2 = 1 - var is a pointer to int + * bit 3 = 1 - var is a pointer to long + * + * Note: The options definition is terminated by a topt + * containing only zeroes. + */ + +#define GLO_END 0 +#define GLO_UNKNOWN -1 +#define GLO_NOARG -2 +#define GLO_CONTINUE -3 + +int getlopt (int argc, char *argv[], topt *opts); + +/* return values: + * GLO_END (0) end of options + * GLO_UNKNOWN (-1) unknown option *loptarg + * GLO_NOARG (-2) missing argument + * GLO_CONTINUE (-3) (reserved for internal use) + * else - return value according to flags (see above) + */ + + +#endif diff --git a/deps/mpg123/src/httpget.c b/deps/mpg123/src/httpget.c new file mode 100644 index 0000000..4339858 --- /dev/null +++ b/deps/mpg123/src/httpget.c @@ -0,0 +1,700 @@ +/* + httpget.c: http communication + + copyright ?-2011 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written Oliver Fromme + old timestamp: Wed Apr 9 20:57:47 MET DST 1997 + + Thomas' notes: + + I used to do + GET http://server/path HTTP/1.0 + + But RFC 1945 says: The absoluteURI form is only allowed when the request is being made to a proxy. + + so I should not do that. Since name based virtual hosts need the hostname in the request, I still need to provide that info. + Enter HTTP/1.1... there is a Host eader field to use (that mpg123 supposedly has used since some time anyway - but did it really work with my vhost test server)? + Now + GET /path/bla HTTP/1.1\r\nHost: host[:port] + Should work, but as a funny sidenote: + + RFC2616: To allow for transition to absoluteURIs in all requests in future versions of HTTP, all HTTP/1.1 servers MUST accept the absoluteURI form in requests, even though HTTP/1.1 clients will only generate them in requests to proxies. + + I was already full-on HTTP/1.1 as I recognized that mpg123 then would have to accept the chunked transfer encoding. + That is not desireable for its purpose... maybe when interleaving of shoutcasts with metadata chunks is supported, we can upgrade to 1.1. + Funny aspect there is that shoutcast servers do not do HTTP/1.1 chunked transfer but implement some different chunking themselves... +*/ + +#include "mpg123app.h" +#include "httpget.h" + +#ifdef NETWORK +#include "resolver.h" + +#include +#include "true.h" +#endif + +#include "debug.h" + +void httpdata_init(struct httpdata *e) +{ + mpg123_init_string(&e->content_type); + mpg123_init_string(&e->icy_url); + mpg123_init_string(&e->icy_name); + e->icy_interval = 0; + e->proxystate = PROXY_UNKNOWN; + mpg123_init_string(&e->proxyhost); + mpg123_init_string(&e->proxyport); +} + +void httpdata_reset(struct httpdata *e) +{ + mpg123_free_string(&e->content_type); + mpg123_free_string(&e->icy_url); + mpg123_free_string(&e->icy_name); + e->icy_interval = 0; + /* the other stuff shall persist */ +} + +void httpdata_free(struct httpdata *e) +{ + httpdata_reset(e); + mpg123_free_string(&e->proxyhost); + mpg123_free_string(&e->proxyport); +} + +/* mime type classes */ +#define M_FILE 0 +#define M_M3U 1 +#define M_PLS 2 +static const char* mime_file[] = +{ + "audio/mpeg", "audio/x-mpeg", + "audio/mp3", "audio/x-mp3", + "audio/mpeg3", "audio/x-mpeg3", + "audio/mpg", "audio/x-mpg", + "audio/x-mpegaudio", + "application/octet-stream", /* Assume raw binary data is some MPEG data. */ + NULL +}; +static const char* mime_m3u[] = { "audio/mpegurl", "audio/mpeg-url", "audio/x-mpegurl", NULL }; +static const char* mime_pls[] = { "audio/x-scpls", "audio/scpls", "application/pls", NULL }; +static const char** mimes[] = { mime_file, mime_m3u, mime_pls, NULL }; + +int debunk_mime(const char* mime) +{ + int i,j; + size_t len; + int r = 0; + char *aux; + /* Watch out for such: "audio/x-mpegurl; charset=utf-8" */ + aux = strchr(mime, ';'); + if(aux != NULL) + { + fprintf(stderr, "Warning: additional info in content-type ignored (%s)\n", aux+1); + /* Just compare up to before the ";". */ + len = aux-mime; + } + /* Else, compare the whole string -- including the end. */ + else len = strlen(mime)+1; + + for(i=0; mimes[i] != NULL; ++i) + for(j=0; mimes[i][j] != NULL; ++j) + if(!strncasecmp(mimes[i][j], mime, len)) goto debunk_result; + +debunk_result: + if(mimes[i] != NULL) + { + switch(i) + { + case M_FILE: r = IS_FILE; break; + case M_M3U: r = IS_LIST|IS_M3U; break; + case M_PLS: r = IS_LIST|IS_PLS; break; + default: error("unexpected MIME debunk result -- coding error?!"); + } + } + return r; +} + + +#ifdef NETWORK +#if !defined (WANT_WIN32_SOCKETS) +static int writestring (int fd, mpg123_string *string) +{ + size_t result, bytes; + char *ptr = string->p; + bytes = string->fill ? string->fill-1 : 0; + + while(bytes) + { + result = write(fd, ptr, bytes); + if(result < 0 && errno != EINTR) + { + perror ("writing http string"); + return FALSE; + } + else if(result == 0) + { + error("write: socket closed unexpectedly"); + return FALSE; + } + ptr += result; + bytes -= result; + } + return TRUE; +} + +static size_t readstring (mpg123_string *string, size_t maxlen, FILE *f) +{ + int err; + debug2("Attempting readstring on %d for %"SIZE_P" bytes", f ? fileno(f) : 0, (size_p)maxlen); + string->fill = 0; + while(maxlen == 0 || string->fill < maxlen) + { + if(string->size-string->fill < 1) + if(!mpg123_grow_string(string, string->fill+4096)) + { + error("Cannot allocate memory for reading."); + string->fill = 0; + return 0; + } + err = read(fileno(f),string->p+string->fill,1); + /* Whoa... reading one byte at a time... one could ensure the line break in another way, but more work. */ + if( err == 1) + { + string->fill++; + if(string->p[string->fill-1] == '\n') break; + } + else if(errno != EINTR) + { + error("Error reading from socket or unexpected EOF."); + string->fill = 0; + /* bail out to prevent endless loop */ + return 0; + } + } + + if(!mpg123_grow_string(string, string->fill+1)) + { + string->fill=0; + } + else + { + string->p[string->fill] = 0; + string->fill++; + } + return string->fill; +} +#endif /* WANT_WIN32_SOCKETS */ + +void encode64 (char *source,char *destination) +{ + static char *Base64Digits = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + int n = 0; + int ssiz=strlen(source); + int i; + + for (i = 0 ; i < ssiz ; i += 3) { + unsigned int buf; + buf = ((unsigned char *)source)[i] << 16; + if (i+1 < ssiz) + buf |= ((unsigned char *)source)[i+1] << 8; + if (i+2 < ssiz) + buf |= ((unsigned char *)source)[i+2]; + + destination[n++] = Base64Digits[(buf >> 18) % 64]; + destination[n++] = Base64Digits[(buf >> 12) % 64]; + if (i+1 < ssiz) + destination[n++] = Base64Digits[(buf >> 6) % 64]; + else + destination[n++] = '='; + if (i+2 < ssiz) + destination[n++] = Base64Digits[buf % 64]; + else + destination[n++] = '='; + } + destination[n++] = 0; +} + +/* Look out for HTTP header field to parse, construct C string with the value. + Attention: Modifies argument, since it's so convenient... */ +char *get_header_val(const char *hname, mpg123_string *response) +{ + char *tmp = NULL; + size_t prelen = strlen(hname); + /* if header name found, next char is at least something, so just check for : */ + if(!strncasecmp(hname, response->p, prelen) && (response->p[prelen] == ':')) + { + ++prelen; + if((tmp = strchr(response->p, '\r')) != NULL ) tmp[0] = 0; + if((tmp = strchr(response->p, '\n')) != NULL ) tmp[0] = 0; + tmp = response->p+prelen; + /* I _know_ that there is a terminating zero, so this loop is safe. */ + while((tmp[0] == ' ') || (tmp[0] == '\t')) + { + ++tmp; + } + } + return tmp; +} + +/* Iterate over header field names and storage locations, to possibly get those values. */ +void get_header_string(mpg123_string *response, const char *fieldname, mpg123_string *store) +{ + char *tmp; + if((tmp = get_header_val(fieldname, response))) + { + if(mpg123_set_string(store, tmp)){ debug2("got %s %s", fieldname, store->p); return; } + else{ error2("unable to set %s to %s!", fieldname, tmp); } + } +} + +/* shoutcsast meta data: 1=on, 0=off */ + +char *httpauth = NULL; + +size_t accept_length(void) +{ + int i,j; + static size_t l = 0; + if(l) return l; + l += strlen("Accept: "); + for(i=0; mimes[i] != NULL; ++i) + for(j=0; mimes[i][j] != NULL; ++j){ l += strlen(mimes[i][j]) + strlen(", "); } + l += strlen("*/*\r\n"); + debug1("initial computation of accept header length: %lu", (unsigned long)l); + return l; +} + +/* Returns TRUE or FALSE for success. */ +int proxy_init(struct httpdata *hd) +{ + int ret = TRUE; + /* If we don't have explicit proxy given, probe the environment. */ + if (!param.proxyurl) + if (!(param.proxyurl = getenv("MP3_HTTP_PROXY"))) + if (!(param.proxyurl = getenv("http_proxy"))) + param.proxyurl = getenv("HTTP_PROXY"); + /* Now continue if we have something. */ + if (param.proxyurl && param.proxyurl[0] && strcmp(param.proxyurl, "none")) + { + mpg123_string proxyurl; + mpg123_init_string(&proxyurl); + if( !mpg123_set_string(&proxyurl, param.proxyurl) + || !split_url(&proxyurl, NULL, &hd->proxyhost, &hd->proxyport, NULL)) + { + error("splitting proxy URL"); + ret = FALSE; + } + else if(param.verbose > 1) fprintf(stderr, "Note: Using proxy %s\n", hd->proxyhost.p); +#if 0 /* not yet there */ + if(!try_host_lookup(proxyhost)) + { + error("Unknown proxy host \"%s\".\n", proxyhost.p); + ret = FALSE; + } +#endif + mpg123_free_string(&proxyurl); + if(ret) hd->proxystate = PROXY_HOST; /* We got hostname and port settled. */ + else hd->proxystate = PROXY_NONE; + } + else hd->proxystate = PROXY_NONE; + + return ret; +} + +static int append_accept(mpg123_string *s) +{ + size_t i,j; + if(!mpg123_add_string(s, "Accept: ")) return FALSE; + + /* We prefer what we know. */ + for(i=0; mimes[i] != NULL; ++i) + for(j=0; mimes[i][j] != NULL; ++j) + { + if( !mpg123_add_string(s, mimes[i][j]) + || !mpg123_add_string(s, ", ") ) + return FALSE; + } + /* Well... in the end, we accept everything, trying to make sense with reality. */ + if(!mpg123_add_string(s, "*/*\r\n")) return FALSE; + + return TRUE; +} + + +/* + Converts spaces to "%20" ... actually, I have to ask myself why. + What about converting them to "+" instead? Would make things a lot easier. + Or, on the other hand... what about avoiding HTML encoding at all? +*/ +int translate_url(const char *url, mpg123_string *purl) +{ + const char *sptr; + /* The length of purl is upper bound by 3*strlen(url) + 1 if + * everything in it is a space (%20) - or any encoded character */ + if (strlen(url) >= SIZE_MAX/3) + { + error("URL too long. Skipping..."); + return FALSE; + } + /* Prepare purl in one chunk, to minimize mallocs. */ + if(!mpg123_resize_string(purl, strlen(url) + 31)) return FALSE; + /* + * 2000-10-21: + * We would like spaces to be automatically converted to %20's when + * fetching via HTTP. + * -- Martin Sjögren + * Hm, why only spaces? Maybe one should do this http stuff more properly... + */ + if ((sptr = strchr(url, ' ')) == NULL) + mpg123_set_string(purl, url); + else + { /* Note that sptr is set from the if to this else... */ + const char *urlptr = url; + mpg123_set_string(purl, ""); + do { + if(! ( mpg123_add_substring(purl, urlptr, 0, sptr-urlptr) + && mpg123_add_string(purl, "%20") ) ) + return FALSE; + urlptr = sptr + 1; + } while ((sptr = strchr (urlptr, ' ')) != NULL); + if(!mpg123_add_string(purl, urlptr)) return FALSE; + } + /* now see if a terminating / may be needed */ + if(strchr(purl->p+(strncmp("http://", purl->p, 7) ? 0 : 7), '/') == NULL + && !mpg123_add_string(purl, "/")) + return FALSE; + + return TRUE; +} + +int fill_request(mpg123_string *request, mpg123_string *host, mpg123_string *port, mpg123_string *httpauth1, int *try_without_port) +{ + char* ttemp; + int ret = TRUE; + const char *icy = param.talk_icy ? icy_yes : icy_no; + + /* hm, my test redirection had troubles with line break before HTTP/1.0 */ + if((ttemp = strchr(request->p,'\r')) != NULL){ *ttemp = 0; request->fill = ttemp-request->p+1; } + + if((ttemp = strchr(request->p,'\n')) != NULL){ *ttemp = 0; request->fill = ttemp-request->p+1; } + + /* Fill out the request further... */ + if( !mpg123_add_string(request, " HTTP/1.0\r\nUser-Agent: ") + || !mpg123_add_string(request, PACKAGE_NAME) + || !mpg123_add_string(request, "/") + || !mpg123_add_string(request, PACKAGE_VERSION) + || !mpg123_add_string(request, "\r\n") ) + return FALSE; + + if(host->fill) + { /* Give virtual hosting a chance... adding the "Host: ... " line. */ + debug2("Host: %s:%s", host->p, port->p); + if( mpg123_add_string(request, "Host: ") + && mpg123_add_string(request, host->p) + && ( *try_without_port || ( + mpg123_add_string(request, ":") + && mpg123_add_string(request, port->p) )) + && mpg123_add_string(request, "\r\n") ) + { + if(*try_without_port) *try_without_port = 0; + } + else return FALSE; + } + + /* Acceptance, stream setup. */ + if( !append_accept(request) + || !mpg123_add_string(request, CONN_HEAD) + || !mpg123_add_string(request, icy) ) + return FALSE; + + /* Authorization. */ + if (httpauth1->fill || httpauth) { + char *buf; + if(!mpg123_add_string(request,"Authorization: Basic ")) return FALSE; + if(httpauth1->fill) { + if(httpauth1->fill > SIZE_MAX / 4) return FALSE; + + buf=(char *)malloc(httpauth1->fill * 4); + if(!buf) + { + error("malloc() failed for http auth, out of memory."); + return FALSE; + } + encode64(httpauth1->p,buf); + } else { + if(strlen(httpauth) > SIZE_MAX / 4 - 4 ) return FALSE; + + buf=(char *)malloc((strlen(httpauth) + 1) * 4); + if(!buf) + { + error("malloc() for http auth failed, out of memory."); + return FALSE; + } + encode64(httpauth,buf); + } + + if( !mpg123_add_string(request, buf) || !mpg123_add_string(request, "\r\n")) + ret = FALSE; + + free(buf); /* Watch out for leaking if you introduce returns before this line. */ + } + if(ret) ret = mpg123_add_string(request, "\r\n"); + + return ret; +} +#if !defined (WANT_WIN32_SOCKETS) +static int resolve_redirect(mpg123_string *response, mpg123_string *request_url, mpg123_string *purl) +{ + debug1("request_url:%s", request_url->p); + /* initialized with full old url */ + if(!mpg123_copy_string(request_url, purl)) return FALSE; + + /* We may strip it down to a prefix ot totally. */ + if(strncasecmp(response->p, "Location: http://", 17)) + { /* OK, only partial strip, need prefix for relative path. */ + char* ptmp = NULL; + /* though it's not RFC (?), accept relative URIs as wget does */ + fprintf(stderr, "NOTE: no complete URL in redirect, constructing one\n"); + /* not absolute uri, could still be server-absolute */ + /* I prepend a part of the request... out of the request */ + if(response->p[10] == '/') + { + /* only prepend http://server/ */ + /* I null the first / after http:// */ + ptmp = strchr(purl->p+7,'/'); + if(ptmp != NULL){ purl->fill = ptmp-purl->p+1; purl->p[purl->fill-1] = 0; } + } + else + { + /* prepend http://server/path/ */ + /* now we want the last / */ + ptmp = strrchr(purl->p+7, '/'); + if(ptmp != NULL){ purl->fill = ptmp-purl->p+2; purl->p[purl->fill-1] = 0; } + } + } + else purl->fill = 0; + + debug1("prefix=%s", purl->fill ? purl->p : ""); + if(!mpg123_add_string(purl, response->p+10)) return FALSE; + + debug1(" purl: %s", purl->p); + debug1("old request_url: %s", request_url->p); + + return TRUE; +} + +int http_open(char* url, struct httpdata *hd) +{ + mpg123_string purl, host, port, path; + mpg123_string request, response, request_url; + mpg123_string httpauth1; + int sock = -1; + int oom = 0; + int relocate, numrelocs = 0; + int got_location = FALSE; + FILE *myfile = NULL; + /* + workaround for http://www.global24music.com/rautemusik/files/extreme/isdn.pls + this site's apache gives me a relocation to the same place when I give the port in Host request field + for the record: Apache/2.0.51 (Fedora) + */ + int try_without_port = 0; + mpg123_init_string(&purl); + mpg123_init_string(&host); + mpg123_init_string(&port); + mpg123_init_string(&path); + mpg123_init_string(&request); + mpg123_init_string(&response); + mpg123_init_string(&request_url); + mpg123_init_string(&httpauth1); + + /* Get initial info for proxy server. Once. */ + if(hd->proxystate == PROXY_UNKNOWN && !proxy_init(hd)) goto exit; + + if(!translate_url(url, &purl)){ oom=1; goto exit; } + + /* Don't confuse the different auth strings... */ + if(!split_url(&purl, &httpauth1, NULL, NULL, NULL) ){ oom=1; goto exit; } + + /* "GET http://" 11 + * " HTTP/1.0\r\nUser-Agent: /\r\n" + * 26 + PACKAGE_NAME + PACKAGE_VERSION + * accept header + accept_length() + * "Authorization: Basic \r\n" 23 + * "\r\n" 2 + * ... plus the other predefined header lines + */ + /* Just use this estimate as first guess to reduce malloc calls in string library. */ + { + size_t length_estimate = 62 + strlen(PACKAGE_NAME) + strlen(PACKAGE_VERSION) + + accept_length() + strlen(CONN_HEAD) + strlen(icy_yes) + purl.fill; + if( !mpg123_grow_string(&request, length_estimate) + || !mpg123_grow_string(&response,4096) ) + { + oom=1; goto exit; + } + } + + do + { + /* Storing the request url, with http:// prepended if needed. */ + /* used to be url here... seemed wrong to me (when loop advanced...) */ + if(strncasecmp(purl.p, "http://", 7) != 0) mpg123_set_string(&request_url, "http://"); + else mpg123_set_string(&request_url, ""); + + mpg123_add_string(&request_url, purl.p); + + if (hd->proxystate >= PROXY_HOST) + { + /* We will connect to proxy, full URL goes into the request. */ + if( !mpg123_copy_string(&hd->proxyhost, &host) + || !mpg123_copy_string(&hd->proxyport, &port) + || !mpg123_set_string(&request, "GET ") + || !mpg123_add_string(&request, request_url.p) ) + { + oom=1; goto exit; + } + } + else + { + /* We will connect to the host from the URL and only the path goes into the request. */ + if(!split_url(&purl, NULL, &host, &port, &path)){ oom=1; goto exit; } + if( !mpg123_set_string(&request, "GET ") + || !mpg123_add_string(&request, path.p) ) + { + oom=1; goto exit; + } + } + + if(!fill_request(&request, &host, &port, &httpauth1, &try_without_port)){ oom=1; goto exit; } + + httpauth1.fill = 0; /* We use the auth data from the URL only once. */ + debug2("attempting to open_connection to %s:%s", host.p, port.p); + sock = open_connection(&host, &port); + if(sock < 0) + { + error1("Unable to establish connection to %s", host.fill ? host.p : ""); + goto exit; + } +#define http_failure close(sock); sock=-1; goto exit; + + if(param.verbose > 2) fprintf(stderr, "HTTP request:\n%s\n",request.p); + if(!writestring(sock, &request)){ http_failure; } + if (!(myfile = fdopen(sock, "rb"))) + { + error1("fdopen: %s", strerror(errno)); + http_failure; + } + relocate = FALSE; + /* Arbitrary length limit here... */ +#define safe_readstring \ + readstring(&response, SIZE_MAX/16, myfile); \ + if(response.fill > SIZE_MAX/16) /* > because of appended zero. */ \ + { \ + error("HTTP response line exceeds max. length"); \ + http_failure; \ + } \ + else if(response.fill == 0) \ + { \ + error("readstring failed"); \ + http_failure; \ + } \ + if(param.verbose > 2) fprintf(stderr, "HTTP in: %s", response.p); + safe_readstring; + + { + char *sptr; + if((sptr = strchr(response.p, ' '))) + { + if(response.fill > sptr-response.p+2) + switch (sptr[1]) + { + case '3': + relocate = TRUE; + case '2': + break; + default: + fprintf (stderr, "HTTP request failed: %s", sptr+1); /* '\n' is included */ + http_failure; + } + else{ error("Too short response,"); http_failure; } + } + } + + /* If we are relocated, we need to look out for a Location header. */ + got_location = FALSE; + + do + { + safe_readstring; /* Think about that: Should we really error out when we get nothing? Could be that the server forgot the trailing empty line... */ + if (!strncasecmp(response.p, "Location: ", 10)) + { /* It is a redirection! */ + if(!resolve_redirect(&response, &request_url, &purl)){ oom=1, http_failure; } + + if(!strcmp(purl.p, request_url.p)) + { + warning("relocated to very same place! trying request again without host port"); + try_without_port = 1; + } + got_location = TRUE; + } + else + { /* We got a header line (or the closing empty line). */ + char *tmp; + debug1("searching for header values... %s", response.p); + /* Not sure if I want to bail out on error here. */ + /* Also: What text encoding are these strings in? Doesn't need to be plain ASCII... */ + get_header_string(&response, "content-type", &hd->content_type); + get_header_string(&response, "icy-name", &hd->icy_name); + get_header_string(&response, "icy-url", &hd->icy_url); + + /* watch out for icy-metaint */ + if((tmp = get_header_val("icy-metaint", &response))) + { + hd->icy_interval = (off_t) atol(tmp); /* atoll ? */ + debug1("got icy-metaint %li", (long int)hd->icy_interval); + } + } + } while(response.p[0] != '\r' && response.p[0] != '\n'); + } while(relocate && got_location && purl.fill && numrelocs++ < HTTP_MAX_RELOCATIONS); + if(relocate) + { + if(!got_location) + error("Server meant to redirect but failed to provide a location!"); + else + error1("Too many HTTP relocations (%i).", numrelocs); + + http_failure; + } + +exit: /* The end as well as the exception handling point... */ + if(oom) error("Apparently, I ran out of memory or had some bad input data..."); + + mpg123_free_string(&purl); + mpg123_free_string(&host); + mpg123_free_string(&port); + mpg123_free_string(&path); + mpg123_free_string(&request); + mpg123_free_string(&response); + mpg123_free_string(&request_url); + mpg123_free_string(&httpauth1); + return sock; +} +#endif /*WANT_WIN32_SOCKETS*/ + +#else /* NETWORK */ + +/* stub */ +int http_open (char* url, struct httpdata *hd) +{ + return -1; +} +#endif + +/* EOF */ + diff --git a/deps/mpg123/src/httpget.h b/deps/mpg123/src/httpget.h new file mode 100644 index 0000000..2fccfaf --- /dev/null +++ b/deps/mpg123/src/httpget.h @@ -0,0 +1,66 @@ +/* + httpget: HTTP input routines (the header) + + copyright 2007 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Thomas Orgis + + Note about MIME types: + You feed debunk_mime() a MIME string and it classifies it as it is relevant for mpg123. + In httpget.c are the MIME class lists, which may be appended to to support more bogus MIME types. +*/ + +#ifndef _HTTPGET_H_ +#define _HTTPGET_H_ +#include "mpg123.h" + +/* Pulled in by mpg123app.h! */ + +struct httpdata +{ + mpg123_string content_type; + mpg123_string icy_name; + mpg123_string icy_url; + off_t icy_interval; + mpg123_string proxyhost; + mpg123_string proxyport; + /* Partly dummy for now... later proxy host resolution will be cached (PROXY_ADDR). */ + enum { PROXY_UNKNOWN=0, PROXY_NONE, PROXY_HOST, PROXY_ADDR } proxystate; +}; + +void httpdata_init(struct httpdata *e); +void httpdata_reset(struct httpdata *e); +void httpdata_free(struct httpdata *e); + +/* There is a whole lot of MIME types for the same thing. + the function will reduce it to a combination of these flags */ +#define IS_FILE 1 +#define IS_LIST 2 +#define IS_M3U 4 +#define IS_PLS 8 + +#define HTTP_MAX_RELOCATIONS 20 + +int debunk_mime(const char* mime); + +/*Previously static functions, shared for win32_net_support */ +int proxy_init(struct httpdata *hd); +int translate_url(const char *url, mpg123_string *purl); +size_t accept_length(void); +int fill_request(mpg123_string *request, mpg123_string *host, mpg123_string *port, mpg123_string *httpauth1, int *try_without_port); +void get_header_string(mpg123_string *response, const char *fieldname, mpg123_string *store); +char *get_header_val(const char *hname, mpg123_string *response); + +/* needed for HTTP/1.1 non-pipelining mode */ +/* #define CONN_HEAD "Connection: close\r\n" */ +#define CONN_HEAD "" +#define icy_yes "Icy-MetaData: 1\r\n" +#define icy_no "Icy-MetaData: 0\r\n" + +extern char *proxyurl; +extern unsigned long proxyip; +/* takes url and content type string address, opens resource, returns fd for data, allocates and sets content type */ +extern int http_open (char* url, struct httpdata *hd); +extern char *httpauth; + +#endif diff --git a/deps/mpg123/src/legacy_module.c b/deps/mpg123/src/legacy_module.c new file mode 100644 index 0000000..812032d --- /dev/null +++ b/deps/mpg123/src/legacy_module.c @@ -0,0 +1,74 @@ +/* + legacy_module.c: dummy interface to modular code loader for legacy build system + + copyright 2008 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Nicholas J Humfrey +*/ + +#include "mpg123app.h" +#include "debug.h" + +/* A single module is staticly compiled in for each type */ +extern mpg123_module_t mpg123_output_module_info; +/* extern mpg123_module_t mpg123_input_module_info; */ + + +/* Open a module */ +mpg123_module_t* +open_module( const char* type, const char* name ) +{ + mpg123_module_t *mod = NULL; + + /* Select the module info structure, based on the desired type */ + if (strcmp(type, "output")==0) { + mod = &mpg123_output_module_info; +/* + } else if (strcmp(type, "input")==0) { + mod = &mpg123_input_module_info; +*/ + } else { + error1("Unable to open module type '%s'.", type); + return NULL; + } + + /* Check the module compiled in is the module requested */ + if (strcmp(name, mod->name)!=0) { + error1("Unable to open requested module '%s'.", name); + error1("The only available statically compiled module is '%s'.", mod->name); + return NULL; + } + + /* Debugging info */ + debug1("Details of static module type '%s':", type); + debug1(" api_version=%d", mod->api_version); + debug1(" name=%s", mod->name); + debug1(" description=%s", mod->description); + debug1(" revision=%s", mod->revision); + debug1(" handle=%p", (void*)mod->handle); + + return mod; +} + + +void close_module( mpg123_module_t* module ) +{ + debug("close_module()"); + + /* Module was never really 'loaded', so nothing to do here. */ +} + + +void list_modules() +{ + debug("list_modules()" ); + + printf("\nmpg123 has been built in legacy mode - dynamic modules are not available.\n"); + + printf("Available modules\n"); + printf("-----------------\n"); + printf("%-15s%s %s\n", mpg123_output_module_info.name, "output", mpg123_output_module_info.description ); + +} + + diff --git a/deps/mpg123/src/libmpg123/Makefile.am b/deps/mpg123/src/libmpg123/Makefile.am new file mode 100644 index 0000000..22035a1 --- /dev/null +++ b/deps/mpg123/src/libmpg123/Makefile.am @@ -0,0 +1,141 @@ +## Makefile.am: produce Makefile.in from this + +## copyright by the mpg123 project - free software under the terms of the LGPL 2.1 +## see COPYING and AUTHORS files in distribution or http://mpg123.org +## initially written by Nicholas J. Humfrey + +#AM_CFLAGS = @AUDIO_CFLAGS@ +#AM_LDFLAGS = +INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/libmpg123 + +EXTRA_DIST = mpg123.h.in + +EXTRA_PROGRAMS = testcpu +testcpu_dependencies = getcpuflags.$(OBJEXT) +testcpu_sources = testcpu.c +testcpu_LDADD = getcpuflags.$(OBJEXT) + + +CLEANFILES = *.a + + +# The library can have different names, depending on largefile setup. +# Libtool macros think they're smart. Because of that mpg123.la does not work, it must be libmpg123.la . +lib_LTLIBRARIES = libmpg123.la +nodist_include_HEADERS = mpg123.h + +libmpg123_la_LDFLAGS = -no-undefined -version-info @LIBMPG123_VERSION@ -export-symbols-regex '^mpg123_' +libmpg123_la_LIBADD = @DECODER_LOBJ@ @LFS_LOBJ@ +libmpg123_la_DEPENDENCIES = @DECODER_LOBJ@ @LFS_LOBJ@ + +libmpg123_la_SOURCES = \ + intsym.h \ + compat.c \ + compat.h \ + mpeghead.h \ + parse.c \ + parse.h \ + frame.c \ + format.c \ + frame.h \ + reader.h \ + debug.h \ + decode.h \ + sample.h \ + dct64.c \ + synth.h \ + synth_mono.h \ + synth_ntom.h \ + synth_8bit.h \ + synths.h \ + equalizer.c \ + huffman.h \ + icy.h \ + icy2utf8.h \ + id3.h \ + id3.c \ + true.h \ + getbits.h \ + optimize.h \ + optimize.c \ + readers.c \ + tabinit.c \ + libmpg123.c \ + gapless.h \ + mpg123lib_intern.h \ + mangle.h \ + getcpuflags.h \ + index.h \ + index.c + +EXTRA_libmpg123_la_SOURCES = \ + lfs_alias.c \ + lfs_wrap.c \ + icy.c \ + icy2utf8.c \ + l2tables.h \ + layer1.c \ + layer2.c \ + layer3.c \ + dither.h \ + dither.c \ + feature.c \ + dct36_3dnowext.S \ + dct36_3dnow.S \ + dct64_3dnowext.S \ + dct64_3dnow.S \ + dct64_altivec.c \ + dct64_i386.c \ + dct64_i486.c \ + dct64_mmx.S \ + dct64_sse.S \ + dct64_sse_float.S \ + dct64_x86_64.S \ + dct64_x86_64_float.S \ + dct64_neon.S \ + dct64_neon_float.S \ + synth_3dnowext.S \ + synth_3dnow.S \ + synth_altivec.c \ + synth_i486.c \ + synth_i586_dither.S \ + synth_i586.S \ + synth_mmx.S \ + synth_sse3d.h \ + synth_sse.S \ + synth_sse_float.S \ + synth_sse_s32.S \ + synth_sse_accurate.S \ + synth_stereo_sse_float.S \ + synth_stereo_sse_s32.S \ + synth_stereo_sse_accurate.S \ + synth_x86_64.S \ + synth_x86_64_float.S \ + synth_x86_64_s32.S \ + synth_x86_64_accurate.S \ + synth_stereo_x86_64.S \ + synth_stereo_x86_64_float.S \ + synth_stereo_x86_64_s32.S \ + synth_stereo_x86_64_accurate.S \ + synth_arm.S \ + synth_arm_accurate.S \ + synth_neon.S \ + synth_neon_float.S \ + synth_neon_s32.S \ + synth_neon_accurate.S \ + synth_stereo_neon.S \ + synth_stereo_neon_float.S \ + synth_stereo_neon_s32.S \ + synth_stereo_neon_accurate.S \ + ntom.c \ + synth.c \ + synth_8bit.c \ + synth_real.c \ + synth_s32.c \ + equalizer_3dnow.S \ + tabinit_mmx.S \ + stringbuf.c \ + getcpuflags.S \ + l12_integer_tables.h \ + l3_integer_tables.h + diff --git a/deps/mpg123/src/libmpg123/Makefile.in b/deps/mpg123/src/libmpg123/Makefile.in new file mode 100644 index 0000000..a980f10 --- /dev/null +++ b/deps/mpg123/src/libmpg123/Makefile.in @@ -0,0 +1,919 @@ +# Makefile.in generated by automake 1.12.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +EXTRA_PROGRAMS = testcpu$(EXEEXT) +subdir = src/libmpg123 +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/mpg123.h.in $(top_srcdir)/build/depcomp +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/addrconfig.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/src/config.h +CONFIG_CLEAN_FILES = mpg123.h +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +am_libmpg123_la_OBJECTS = compat.lo parse.lo frame.lo format.lo \ + dct64.lo equalizer.lo id3.lo optimize.lo readers.lo tabinit.lo \ + libmpg123.lo index.lo +libmpg123_la_OBJECTS = $(am_libmpg123_la_OBJECTS) +libmpg123_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libmpg123_la_LDFLAGS) $(LDFLAGS) -o $@ +testcpu_SOURCES = testcpu.c +testcpu_OBJECTS = testcpu.$(OBJEXT) +testcpu_DEPENDENCIES = getcpuflags.$(OBJEXT) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +depcomp = $(SHELL) $(top_srcdir)/build/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) +LTCPPASCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libmpg123_la_SOURCES) $(EXTRA_libmpg123_la_SOURCES) \ + testcpu.c +DIST_SOURCES = $(libmpg123_la_SOURCES) $(EXTRA_libmpg123_la_SOURCES) \ + testcpu.c +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +HEADERS = $(nodist_include_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AIX_CFLAGS = @AIX_CFLAGS@ +AIX_LDFLAGS = @AIX_LDFLAGS@ +AIX_LIBS = @AIX_LIBS@ +ALIB_CFLAGS = @ALIB_CFLAGS@ +ALIB_LDFLAGS = @ALIB_LDFLAGS@ +ALIB_LIBS = @ALIB_LIBS@ +ALSA_CFLAGS = @ALSA_CFLAGS@ +ALSA_LDFLAGS = @ALSA_LDFLAGS@ +ALSA_LIBS = @ALSA_LIBS@ +AMTAR = @AMTAR@ +API_VERSION = @API_VERSION@ +AR = @AR@ +ARTS_CFLAGS = @ARTS_CFLAGS@ +ARTS_LDFLAGS = @ARTS_LDFLAGS@ +ARTS_LIBS = @ARTS_LIBS@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COREAUDIO_CFLAGS = @COREAUDIO_CFLAGS@ +COREAUDIO_LDFLAGS = @COREAUDIO_LDFLAGS@ +COREAUDIO_LIBS = @COREAUDIO_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DECODER_LOBJ = @DECODER_LOBJ@ +DECODER_OBJ = @DECODER_OBJ@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMMY_CFLAGS = @DUMMY_CFLAGS@ +DUMMY_LDFLAGS = @DUMMY_LDFLAGS@ +DUMMY_LIBS = @DUMMY_LIBS@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ESD_CFLAGS = @ESD_CFLAGS@ +ESD_LDFLAGS = @ESD_LDFLAGS@ +ESD_LIBS = @ESD_LIBS@ +EXEC_LT_LDFLAGS = @EXEC_LT_LDFLAGS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +HP_CFLAGS = @HP_CFLAGS@ +HP_LDFLAGS = @HP_LDFLAGS@ +HP_LIBS = @HP_LIBS@ +INCLUDE_STDIO_H = @INCLUDE_STDIO_H@ +INCLUDE_STDLIB_H = @INCLUDE_STDLIB_H@ +INCLUDE_SYS_TYPE_H = @INCLUDE_SYS_TYPE_H@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +JACK_CFLAGS = @JACK_CFLAGS@ +JACK_LDFLAGS = @JACK_LDFLAGS@ +JACK_LIBS = @JACK_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LFS_LOBJ = @LFS_LOBJ@ +LIBMPG123_VERSION = @LIBMPG123_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_LDFLAGS = @LT_LDFLAGS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MINT_CFLAGS = @MINT_CFLAGS@ +MINT_LDFLAGS = @MINT_LDFLAGS@ +MINT_LIBS = @MINT_LIBS@ +MKDIR_P = @MKDIR_P@ +MODULE_OBJ = @MODULE_OBJ@ +NAS_CFLAGS = @NAS_CFLAGS@ +NAS_LDFLAGS = @NAS_LDFLAGS@ +NAS_LIBS = @NAS_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENAL_CFLAGS = @OPENAL_CFLAGS@ +OPENAL_LDFLAGS = @OPENAL_LDFLAGS@ +OPENAL_LIBS = @OPENAL_LIBS@ +OS2_CFLAGS = @OS2_CFLAGS@ +OS2_LDFLAGS = @OS2_LDFLAGS@ +OS2_LIBS = @OS2_LIBS@ +OSS_CFLAGS = @OSS_CFLAGS@ +OSS_LDFLAGS = @OSS_LDFLAGS@ +OSS_LIBS = @OSS_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +OUTPUT_CFLAGS = @OUTPUT_CFLAGS@ +OUTPUT_LDFLAGS = @OUTPUT_LDFLAGS@ +OUTPUT_LIBS = @OUTPUT_LIBS@ +OUTPUT_MOD = @OUTPUT_MOD@ +OUTPUT_OBJ = @OUTPUT_OBJ@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PORTAUDIO_CFLAGS = @PORTAUDIO_CFLAGS@ +PORTAUDIO_LDFLAGS = @PORTAUDIO_LDFLAGS@ +PORTAUDIO_LIBS = @PORTAUDIO_LIBS@ +PULSE_CFLAGS = @PULSE_CFLAGS@ +PULSE_LDFLAGS = @PULSE_LDFLAGS@ +PULSE_LIBS = @PULSE_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LDFLAGS = @SDL_LDFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SGI_CFLAGS = @SGI_CFLAGS@ +SGI_LDFLAGS = @SGI_LDFLAGS@ +SGI_LIBS = @SGI_LIBS@ +SHELL = @SHELL@ +SNDIO_CFLAGS = @SNDIO_CFLAGS@ +SNDIO_LDFLAGS = @SNDIO_LDFLAGS@ +SNDIO_LIBS = @SNDIO_LIBS@ +STRIP = @STRIP@ +SUN_CFLAGS = @SUN_CFLAGS@ +SUN_LDFLAGS = @SUN_LDFLAGS@ +SUN_LIBS = @SUN_LIBS@ +VERSION = @VERSION@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_LDFLAGS = @WIN32_LDFLAGS@ +WIN32_LIBS = @WIN32_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +#AM_CFLAGS = @AUDIO_CFLAGS@ +#AM_LDFLAGS = +INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/libmpg123 +EXTRA_DIST = mpg123.h.in +testcpu_dependencies = getcpuflags.$(OBJEXT) +testcpu_sources = testcpu.c +testcpu_LDADD = getcpuflags.$(OBJEXT) +CLEANFILES = *.a + +# The library can have different names, depending on largefile setup. +# Libtool macros think they're smart. Because of that mpg123.la does not work, it must be libmpg123.la . +lib_LTLIBRARIES = libmpg123.la +nodist_include_HEADERS = mpg123.h +libmpg123_la_LDFLAGS = -no-undefined -version-info @LIBMPG123_VERSION@ -export-symbols-regex '^mpg123_' +libmpg123_la_LIBADD = @DECODER_LOBJ@ @LFS_LOBJ@ +libmpg123_la_DEPENDENCIES = @DECODER_LOBJ@ @LFS_LOBJ@ +libmpg123_la_SOURCES = \ + intsym.h \ + compat.c \ + compat.h \ + mpeghead.h \ + parse.c \ + parse.h \ + frame.c \ + format.c \ + frame.h \ + reader.h \ + debug.h \ + decode.h \ + sample.h \ + dct64.c \ + synth.h \ + synth_mono.h \ + synth_ntom.h \ + synth_8bit.h \ + synths.h \ + equalizer.c \ + huffman.h \ + icy.h \ + icy2utf8.h \ + id3.h \ + id3.c \ + true.h \ + getbits.h \ + optimize.h \ + optimize.c \ + readers.c \ + tabinit.c \ + libmpg123.c \ + gapless.h \ + mpg123lib_intern.h \ + mangle.h \ + getcpuflags.h \ + index.h \ + index.c + +EXTRA_libmpg123_la_SOURCES = \ + lfs_alias.c \ + lfs_wrap.c \ + icy.c \ + icy2utf8.c \ + l2tables.h \ + layer1.c \ + layer2.c \ + layer3.c \ + dither.h \ + dither.c \ + feature.c \ + dct36_3dnowext.S \ + dct36_3dnow.S \ + dct64_3dnowext.S \ + dct64_3dnow.S \ + dct64_altivec.c \ + dct64_i386.c \ + dct64_i486.c \ + dct64_mmx.S \ + dct64_sse.S \ + dct64_sse_float.S \ + dct64_x86_64.S \ + dct64_x86_64_float.S \ + dct64_neon.S \ + dct64_neon_float.S \ + synth_3dnowext.S \ + synth_3dnow.S \ + synth_altivec.c \ + synth_i486.c \ + synth_i586_dither.S \ + synth_i586.S \ + synth_mmx.S \ + synth_sse3d.h \ + synth_sse.S \ + synth_sse_float.S \ + synth_sse_s32.S \ + synth_sse_accurate.S \ + synth_stereo_sse_float.S \ + synth_stereo_sse_s32.S \ + synth_stereo_sse_accurate.S \ + synth_x86_64.S \ + synth_x86_64_float.S \ + synth_x86_64_s32.S \ + synth_x86_64_accurate.S \ + synth_stereo_x86_64.S \ + synth_stereo_x86_64_float.S \ + synth_stereo_x86_64_s32.S \ + synth_stereo_x86_64_accurate.S \ + synth_arm.S \ + synth_arm_accurate.S \ + synth_neon.S \ + synth_neon_float.S \ + synth_neon_s32.S \ + synth_neon_accurate.S \ + synth_stereo_neon.S \ + synth_stereo_neon_float.S \ + synth_stereo_neon_s32.S \ + synth_stereo_neon_accurate.S \ + ntom.c \ + synth.c \ + synth_8bit.c \ + synth_real.c \ + synth_s32.c \ + equalizer_3dnow.S \ + tabinit_mmx.S \ + stringbuf.c \ + getcpuflags.S \ + l12_integer_tables.h \ + l3_integer_tables.h + +all: all-am + +.SUFFIXES: +.SUFFIXES: .S .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libmpg123/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/libmpg123/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +mpg123.h: $(top_builddir)/config.status $(srcdir)/mpg123.h.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } +libmpg123.la: $(libmpg123_la_OBJECTS) $(libmpg123_la_DEPENDENCIES) $(EXTRA_libmpg123_la_DEPENDENCIES) + $(libmpg123_la_LINK) -rpath $(libdir) $(libmpg123_la_OBJECTS) $(libmpg123_la_LIBADD) $(LIBS) +testcpu$(EXEEXT): $(testcpu_OBJECTS) $(testcpu_DEPENDENCIES) $(EXTRA_testcpu_DEPENDENCIES) + @rm -f testcpu$(EXEEXT) + $(LINK) $(testcpu_OBJECTS) $(testcpu_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compat.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct36_3dnow.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct36_3dnowext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_3dnow.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_3dnowext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_altivec.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_i386.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_i486.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_mmx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_neon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_neon_float.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_sse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_sse_float.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_x86_64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_x86_64_float.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dither.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/equalizer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/equalizer_3dnow.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/feature.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/format.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frame.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcpuflags.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icy2utf8.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/id3.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/index.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/layer1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/layer2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/layer3.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lfs_alias.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lfs_wrap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpg123.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntom.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/optimize.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readers.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stringbuf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_3dnow.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_3dnowext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_8bit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_altivec.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_arm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_arm_accurate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_i486.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_i586.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_i586_dither.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_mmx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_neon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_neon_accurate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_neon_float.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_neon_s32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_real.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_s32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_sse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_sse_accurate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_sse_float.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_sse_s32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_neon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_neon_accurate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_neon_float.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_neon_s32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_sse_accurate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_sse_float.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_sse_s32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_x86_64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_x86_64_accurate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_x86_64_float.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_x86_64_s32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_x86_64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_x86_64_accurate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_x86_64_float.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_x86_64_s32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tabinit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tabinit_mmx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testcpu.Po@am__quote@ + +.S.o: +@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCCAS_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCCAS_FALSE@ $(CPPASCOMPILE) -c -o $@ $< + +.S.obj: +@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCCAS_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCCAS_FALSE@ $(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.S.lo: +@am__fastdepCCAS_TRUE@ $(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCCAS_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCCAS_FALSE@ $(LTCPPASCOMPILE) -c -o $@ $< + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-nodist_includeHEADERS: $(nodist_include_HEADERS) + @$(NORMAL_INSTALL) + @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ + done + +uninstall-nodist_includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +cscopelist: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-nodist_includeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-libLTLIBRARIES uninstall-nodist_includeHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool cscopelist ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am \ + install-libLTLIBRARIES install-man \ + install-nodist_includeHEADERS install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-libLTLIBRARIES \ + uninstall-nodist_includeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/deps/mpg123/src/libmpg123/compat.c b/deps/mpg123/src/libmpg123/compat.c new file mode 100644 index 0000000..18ea76e --- /dev/null +++ b/deps/mpg123/src/libmpg123/compat.c @@ -0,0 +1,138 @@ +/* + compat: Some compatibility functions. + + The mpg123 code is determined to keep it's legacy. A legacy of old, old UNIX. + So anything possibly somewhat advanced should be considered to be put here, with proper #ifdef;-) + + copyright 2007-8 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Thomas Orgis, Windows Unicode stuff by JonY. +*/ + +#include "config.h" +#include "compat.h" + +#ifdef _MSC_VER +#include +#else +#include +#endif +#include + +#ifdef WANT_WIN32_UNICODE +#include +#include +#include +#endif + +#include "debug.h" + +/* A safe realloc also for very old systems where realloc(NULL, size) returns NULL. */ +void *safe_realloc(void *ptr, size_t size) +{ + if(ptr == NULL) return malloc(size); + else return realloc(ptr, size); +} + +#ifndef HAVE_STRERROR +const char *strerror(int errnum) +{ + extern int sys_nerr; + extern char *sys_errlist[]; + + return (errnum < sys_nerr) ? sys_errlist[errnum] : ""; +} +#endif + +#ifndef HAVE_STRDUP +char *strdup(const char *src) +{ + char *dest; + + if (!(dest = (char *) malloc(strlen(src)+1))) + return NULL; + else + return strcpy(dest, src); +} +#endif + +int compat_open(const char *filename, int flags) +{ + int ret; +#if defined (WANT_WIN32_UNICODE) + wchar_t *frag = NULL; + + ret = win32_utf8_wide(filename, &frag, NULL); + if ((frag == NULL) || (ret == 0)) goto fallback; /* Fallback to plain open when ucs-2 conversion fails */ + + ret = _wopen(frag, flags); /*Try _wopen */ + if (ret != -1 ) goto open_ok; /* msdn says -1 means failure */ + +fallback: +#endif + +#if (defined(WIN32) && !defined (__CYGWIN__)) /* MSDN says POSIX function is deprecated beginning in Visual C++ 2005 */ + ret = _open(filename, flags); /* Try plain old _open(), if it fails, do nothing */ +#else + /* On UNIX, we always add a default permission mask in case flags|O_CREAT. */ + ret = open(filename, flags, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH); +#endif + +#if defined (WANT_WIN32_UNICODE) +open_ok: + free ((void *)frag); /* Freeing a NULL should be OK */ +#endif + + return ret; +} + +int compat_close(int infd) +{ +#if (defined(WIN32) && !defined (__CYGWIN__)) /* MSDN says POSIX function is deprecated beginning in Visual C++ 2005 */ + return _close(infd); +#else + return close(infd); +#endif +} + +/* Windows Unicode stuff */ + +#ifdef WANT_WIN32_UNICODE +int win32_wide_utf8(const wchar_t * const wptr, char **mbptr, size_t * buflen) +{ + size_t len; + char *buf; + int ret = 0; + + len = WideCharToMultiByte(CP_UTF8, 0, wptr, -1, NULL, 0, NULL, NULL); /* Get utf-8 string length */ + buf = calloc(len + 1, sizeof (char)); /* Can we assume sizeof char always = 1? */ + + if(!buf) len = 0; + else { + if (len != 0) ret = WideCharToMultiByte(CP_UTF8, 0, wptr, -1, buf, len, NULL, NULL); /*Do actual conversion*/ + buf[len] = '0'; /* Must terminate */ + } + *mbptr = buf; /* Set string pointer to allocated buffer */ + if(buflen != NULL) *buflen = (len) * sizeof (char); /* Give length of allocated memory if needed. */ + return ret; +} + +int win32_utf8_wide(const char *const mbptr, wchar_t **wptr, size_t *buflen) +{ + size_t len; + wchar_t *buf; + int ret = 0; + + len = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, mbptr, -1, NULL, 0); /* Get converted size */ + buf = calloc(len + 1, sizeof (wchar_t)); /* Allocate memory accordingly */ + + if(!buf) len = 0; + else { + if (len != 0) ret = MultiByteToWideChar (CP_UTF8, MB_ERR_INVALID_CHARS, mbptr, -1, buf, len); /* Do conversion */ + buf[len] = L'0'; /* Must terminate */ + } + *wptr = buf; /* Set string pointer to allocated buffer */ + if (buflen != NULL) *buflen = len * sizeof (wchar_t); /* Give length of allocated memory if needed. */ + return ret; /* Number of characters written */ +} +#endif diff --git a/deps/mpg123/src/libmpg123/compat.h b/deps/mpg123/src/libmpg123/compat.h new file mode 100644 index 0000000..046d23b --- /dev/null +++ b/deps/mpg123/src/libmpg123/compat.h @@ -0,0 +1,178 @@ +/* + compat: Some compatibility functions and header inclusions. + Basic standard C stuff, that may barely be above/around C89. + + The mpg123 code is determined to keep it's legacy. A legacy of old, old UNIX. + It is envisioned to include this compat header instead of any of the "standard" headers, to catch compatibility issues. + So, don't include stdlib.h or string.h ... include compat.h. + + copyright 2007-8 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Thomas Orgis +*/ + +#ifndef MPG123_COMPAT_H +#define MPG123_COMPAT_H + +#include "config.h" +#include "intsym.h" + +#ifdef HAVE_STDLIB_H +/* realloc, size_t */ +#include +#endif + +#include +#include + +#ifdef HAVE_SIGNAL_H +#include +#else +#ifdef HAVE_SYS_SIGNAL_H +#include +#endif +#endif + +#ifdef HAVE_UNISTD_H +#include +#endif + +/* Types, types, types. */ +/* Do we actually need these two in addition to sys/types.h? As replacement? */ +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_STDINT_H +#include +#endif +/* We want SIZE_MAX, etc. */ +#ifdef HAVE_LIMITS_H +#include +#endif + +#ifndef SIZE_MAX +#define SIZE_MAX ((size_t)-1) +#endif +#ifndef ULONG_MAX +#define ULONG_MAX ((unsigned long)-1) +#endif + +#ifdef HAVE_STRING_H +#include +#endif + +#ifdef OS2 +#include +#endif + +#ifdef HAVE_SYS_TIME_H +#include +#endif +/* For select(), I need select.h according to POSIX 2001, else: sys/time.h sys/types.h unistd.h */ +#ifdef HAVE_SYS_SELECT_H +#include +#endif + +/* To parse big numbers... */ +#ifdef HAVE_ATOLL +#define atobigint atoll +#else +#define atobigint atol +#endif + +typedef unsigned char byte; + +/* A safe realloc also for very old systems where realloc(NULL, size) returns NULL. */ +void *safe_realloc(void *ptr, size_t size); +#ifndef HAVE_STRERROR +const char *strerror(int errnum); +#endif + +#ifndef HAVE_STRDUP +char *strdup(const char *s); +#endif + +/* If we have the size checks enabled, try to derive some sane printfs. + Simple start: Use max integer type and format if long is not big enough. + I am hesitating to use %ll without making sure that it's there... */ +#if !(defined PLAIN_C89) && (defined SIZEOF_OFF_T) && (SIZEOF_OFF_T > SIZEOF_LONG) && (defined PRIiMAX) +# define OFF_P PRIiMAX +typedef intmax_t off_p; +#else +# define OFF_P "li" +typedef long off_p; +#endif + +#if !(defined PLAIN_C89) && (defined SIZEOF_SIZE_T) && (SIZEOF_SIZE_T > SIZEOF_LONG) && (defined PRIuMAX) +# define SIZE_P PRIuMAX +typedef uintmax_t size_p; +#else +# define SIZE_P "lu" +typedef unsigned long size_p; +#endif + +#if !(defined PLAIN_C89) && (defined SIZEOF_SSIZE_T) && (SIZEOF_SSIZE_T > SIZEOF_LONG) && (defined PRIiMAX) +# define SSIZE_P PRIuMAX +typedef intmax_t ssize_p; +#else +# define SSIZE_P "li" +typedef long ssize_p; +#endif + +/** + * Opening a file handle can be different. + * This function here is defined to take a path in native encoding (ISO8859 / UTF-8 / ...), or, when MS Windows Unicode support is enabled, an UTF-8 string that will be converted back to native UCS-2 (wide character) before calling the system's open function. + * @param[in] wptr Pointer to wide string. + * @param[in] mbptr Pointer to multibyte string. + * @return file descriptor (>=0) or error code. + */ +int compat_open(const char *filename, int flags); + +/** + * Closing a file handle can be platform specific. + * This function takes a file descriptor that is to be closed. + * @param[in] infd File descriptor to be closed. + * @return 0 if the file was successfully closed. A return value of -1 indicates an error. + */ +int compat_close(int infd); + +/* Those do make sense in a separate file, but I chose to include them in compat.c because that's the one source whose object is shared between mpg123 and libmpg123 -- and both need the functionality internally. */ + +#ifdef WANT_WIN32_UNICODE +/** + * win32_uni2mbc + * Converts a null terminated UCS-2 string to a multibyte (UTF-8) equivalent. + * Caller is supposed to free allocated buffer. + * @param[in] wptr Pointer to wide string. + * @param[out] mbptr Pointer to multibyte string. + * @param[out] buflen Optional parameter for length of allocated buffer. + * @return status of WideCharToMultiByte conversion. + * + * WideCharToMultiByte - http://msdn.microsoft.com/en-us/library/dd374130(VS.85).aspx + */ +int win32_wide_utf8(const wchar_t * const wptr, char **mbptr, size_t * buflen); + +/** + * win32_mbc2uni + * Converts a null terminated UTF-8 string to a UCS-2 equivalent. + * Caller is supposed to free allocated buffer. + * @param[out] mbptr Pointer to multibyte string. + * @param[in] wptr Pointer to wide string. + * @param[out] buflen Optional parameter for length of allocated buffer. + * @return status of WideCharToMultiByte conversion. + * + * MultiByteToWideChar - http://msdn.microsoft.com/en-us/library/dd319072(VS.85).aspx + */ + +int win32_utf8_wide(const char *const mbptr, wchar_t **wptr, size_t *buflen); +#endif + +/* That one comes from Tellie on OS/2, needed in resolver. */ +#ifdef __KLIBC__ +typedef int socklen_t; +#endif + +#endif diff --git a/deps/mpg123/src/libmpg123/dct36_3dnow.S b/deps/mpg123/src/libmpg123/dct36_3dnow.S new file mode 100644 index 0000000..644204f --- /dev/null +++ b/deps/mpg123/src/libmpg123/dct36_3dnow.S @@ -0,0 +1,505 @@ +/* + dct64_3dnow.s: Replacement of dct36() with AMD's 3DNow! SIMD operations support + + copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Syuuhei Kashiyama + + This code based 'dct36_3dnow.s' by Syuuhei Kashiyama + ,only two types of changes have been made: + + - remove PREFETCH instruction for speedup + - change function name for support 3DNow! automatic detect + + You can find Kashiyama's original 3dnow! support patch + (for mpg123-0.59o) at + http://user.ecc.u-tokyo.ac.jp/~g810370/linux-simd/ (Japanese). + + by KIMURA Takuhiro - until 31.Mar.1999 + - after 1.Apr.1999 + + Replacement of dct36() with AMD's 3DNow! SIMD operations support + + Syuuhei Kashiyama + + The author of this program disclaim whole expressed or implied + warranties with regard to this program, and in no event shall the + author of this program liable to whatever resulted from the use of + this program. Use it at your own risk. +*/ + +#include "mangle.h" + + .globl ASM_NAME(dct36_3dnow) +/* .type ASM_NAME(dct36_3dnow),@function */ +ASM_NAME(dct36_3dnow): + pushl %ebp + movl %esp,%ebp + subl $120,%esp + pushl %esi + pushl %ebx + movl 8(%ebp),%eax + movl 12(%ebp),%esi + movl 16(%ebp),%ecx + movl 20(%ebp),%edx + movl 24(%ebp),%ebx + leal -128(%ebp),%esp + + femms + movq (%eax),%mm0 + movq 4(%eax),%mm1 + pfadd %mm1,%mm0 + movq %mm0,4(%eax) + psrlq $32,%mm1 + movq 12(%eax),%mm2 + punpckldq %mm2,%mm1 + pfadd %mm2,%mm1 + movq %mm1,12(%eax) + psrlq $32,%mm2 + movq 20(%eax),%mm3 + punpckldq %mm3,%mm2 + pfadd %mm3,%mm2 + movq %mm2,20(%eax) + psrlq $32,%mm3 + movq 28(%eax),%mm4 + punpckldq %mm4,%mm3 + pfadd %mm4,%mm3 + movq %mm3,28(%eax) + psrlq $32,%mm4 + movq 36(%eax),%mm5 + punpckldq %mm5,%mm4 + pfadd %mm5,%mm4 + movq %mm4,36(%eax) + psrlq $32,%mm5 + movq 44(%eax),%mm6 + punpckldq %mm6,%mm5 + pfadd %mm6,%mm5 + movq %mm5,44(%eax) + psrlq $32,%mm6 + movq 52(%eax),%mm7 + punpckldq %mm7,%mm6 + pfadd %mm7,%mm6 + movq %mm6,52(%eax) + psrlq $32,%mm7 + movq 60(%eax),%mm0 + punpckldq %mm0,%mm7 + pfadd %mm0,%mm7 + movq %mm7,60(%eax) + psrlq $32,%mm0 + movd 68(%eax),%mm1 + pfadd %mm1,%mm0 + movd %mm0,68(%eax) + movd 4(%eax),%mm0 + movd 12(%eax),%mm1 + punpckldq %mm1,%mm0 + punpckldq 20(%eax),%mm1 + pfadd %mm1,%mm0 + movd %mm0,12(%eax) + psrlq $32,%mm0 + movd %mm0,20(%eax) + psrlq $32,%mm1 + movd 28(%eax),%mm2 + punpckldq %mm2,%mm1 + punpckldq 36(%eax),%mm2 + pfadd %mm2,%mm1 + movd %mm1,28(%eax) + psrlq $32,%mm1 + movd %mm1,36(%eax) + psrlq $32,%mm2 + movd 44(%eax),%mm3 + punpckldq %mm3,%mm2 + punpckldq 52(%eax),%mm3 + pfadd %mm3,%mm2 + movd %mm2,44(%eax) + psrlq $32,%mm2 + movd %mm2,52(%eax) + psrlq $32,%mm3 + movd 60(%eax),%mm4 + punpckldq %mm4,%mm3 + punpckldq 68(%eax),%mm4 + pfadd %mm4,%mm3 + movd %mm3,60(%eax) + psrlq $32,%mm3 + movd %mm3,68(%eax) + + movq 24(%eax),%mm0 + movq 48(%eax),%mm1 + movd ASM_NAME(COS9)+12,%mm2 + punpckldq %mm2,%mm2 + movd ASM_NAME(COS9)+24,%mm3 + punpckldq %mm3,%mm3 + pfmul %mm2,%mm0 + pfmul %mm3,%mm1 + pushl %eax + movl $1,%eax + movd %eax,%mm7 + pi2fd %mm7,%mm7 + popl %eax + movq 8(%eax),%mm2 + movd ASM_NAME(COS9)+4,%mm3 + punpckldq %mm3,%mm3 + pfmul %mm3,%mm2 + pfadd %mm0,%mm2 + movq 40(%eax),%mm3 + movd ASM_NAME(COS9)+20,%mm4 + punpckldq %mm4,%mm4 + pfmul %mm4,%mm3 + pfadd %mm3,%mm2 + movq 56(%eax),%mm3 + movd ASM_NAME(COS9)+28,%mm4 + punpckldq %mm4,%mm4 + pfmul %mm4,%mm3 + pfadd %mm3,%mm2 + movq (%eax),%mm3 + movq 16(%eax),%mm4 + movd ASM_NAME(COS9)+8,%mm5 + punpckldq %mm5,%mm5 + pfmul %mm5,%mm4 + pfadd %mm4,%mm3 + movq 32(%eax),%mm4 + movd ASM_NAME(COS9)+16,%mm5 + punpckldq %mm5,%mm5 + pfmul %mm5,%mm4 + pfadd %mm4,%mm3 + pfadd %mm1,%mm3 + movq 64(%eax),%mm4 + movd ASM_NAME(COS9)+32,%mm5 + punpckldq %mm5,%mm5 + pfmul %mm5,%mm4 + pfadd %mm4,%mm3 + movq %mm2,%mm4 + pfadd %mm3,%mm4 + movq %mm7,%mm5 + punpckldq ASM_NAME(tfcos36)+0,%mm5 + pfmul %mm5,%mm4 + movq %mm4,%mm5 + pfacc %mm5,%mm5 + movd 108(%edx),%mm6 + punpckldq 104(%edx),%mm6 + pfmul %mm6,%mm5 + movd %mm5,36(%ecx) + psrlq $32,%mm5 + movd %mm5,32(%ecx) + movq %mm4,%mm6 + punpckldq %mm6,%mm5 + pfsub %mm6,%mm5 + punpckhdq %mm5,%mm5 + movd 32(%edx),%mm6 + punpckldq 36(%edx),%mm6 + pfmul %mm6,%mm5 + movd 32(%esi),%mm6 + punpckldq 36(%esi),%mm6 + pfadd %mm6,%mm5 + movd %mm5,1024(%ebx) + psrlq $32,%mm5 + movd %mm5,1152(%ebx) + movq %mm3,%mm4 + pfsub %mm2,%mm4 + movq %mm7,%mm5 + punpckldq ASM_NAME(tfcos36)+32,%mm5 + pfmul %mm5,%mm4 + movq %mm4,%mm5 + pfacc %mm5,%mm5 + movd 140(%edx),%mm6 + punpckldq 72(%edx),%mm6 + pfmul %mm6,%mm5 + movd %mm5,68(%ecx) + psrlq $32,%mm5 + movd %mm5,0(%ecx) + movq %mm4,%mm6 + punpckldq %mm6,%mm5 + pfsub %mm6,%mm5 + punpckhdq %mm5,%mm5 + movd 0(%edx),%mm6 + punpckldq 68(%edx),%mm6 + pfmul %mm6,%mm5 + movd 0(%esi),%mm6 + punpckldq 68(%esi),%mm6 + pfadd %mm6,%mm5 + movd %mm5,0(%ebx) + psrlq $32,%mm5 + movd %mm5,2176(%ebx) + movq 8(%eax),%mm2 + movq 40(%eax),%mm3 + pfsub %mm3,%mm2 + movq 56(%eax),%mm3 + pfsub %mm3,%mm2 + movd ASM_NAME(COS9)+12,%mm3 + punpckldq %mm3,%mm3 + pfmul %mm3,%mm2 + movq 16(%eax),%mm3 + movq 32(%eax),%mm4 + pfsub %mm4,%mm3 + movq 64(%eax),%mm4 + pfsub %mm4,%mm3 + movd ASM_NAME(COS9)+24,%mm4 + punpckldq %mm4,%mm4 + pfmul %mm4,%mm3 + movq 48(%eax),%mm4 + pfsub %mm4,%mm3 + movq (%eax),%mm4 + pfadd %mm4,%mm3 + movq %mm2,%mm4 + pfadd %mm3,%mm4 + movq %mm7,%mm5 + punpckldq ASM_NAME(tfcos36)+4,%mm5 + pfmul %mm5,%mm4 + movq %mm4,%mm5 + pfacc %mm5,%mm5 + movd 112(%edx),%mm6 + punpckldq 100(%edx),%mm6 + pfmul %mm6,%mm5 + movd %mm5,40(%ecx) + psrlq $32,%mm5 + movd %mm5,28(%ecx) + movq %mm4,%mm6 + punpckldq %mm6,%mm5 + pfsub %mm6,%mm5 + punpckhdq %mm5,%mm5 + movd 28(%edx),%mm6 + punpckldq 40(%edx),%mm6 + pfmul %mm6,%mm5 + movd 28(%esi),%mm6 + punpckldq 40(%esi),%mm6 + pfadd %mm6,%mm5 + movd %mm5,896(%ebx) + psrlq $32,%mm5 + movd %mm5,1280(%ebx) + movq %mm3,%mm4 + pfsub %mm2,%mm4 + movq %mm7,%mm5 + punpckldq ASM_NAME(tfcos36)+28,%mm5 + pfmul %mm5,%mm4 + movq %mm4,%mm5 + pfacc %mm5,%mm5 + movd 136(%edx),%mm6 + punpckldq 76(%edx),%mm6 + pfmul %mm6,%mm5 + movd %mm5,64(%ecx) + psrlq $32,%mm5 + movd %mm5,4(%ecx) + movq %mm4,%mm6 + punpckldq %mm6,%mm5 + pfsub %mm6,%mm5 + punpckhdq %mm5,%mm5 + movd 4(%edx),%mm6 + punpckldq 64(%edx),%mm6 + pfmul %mm6,%mm5 + movd 4(%esi),%mm6 + punpckldq 64(%esi),%mm6 + pfadd %mm6,%mm5 + movd %mm5,128(%ebx) + psrlq $32,%mm5 + movd %mm5,2048(%ebx) + + movq 8(%eax),%mm2 + movd ASM_NAME(COS9)+20,%mm3 + punpckldq %mm3,%mm3 + pfmul %mm3,%mm2 + pfsub %mm0,%mm2 + movq 40(%eax),%mm3 + movd ASM_NAME(COS9)+28,%mm4 + punpckldq %mm4,%mm4 + pfmul %mm4,%mm3 + pfsub %mm3,%mm2 + movq 56(%eax),%mm3 + movd ASM_NAME(COS9)+4,%mm4 + punpckldq %mm4,%mm4 + pfmul %mm4,%mm3 + pfadd %mm3,%mm2 + movq (%eax),%mm3 + movq 16(%eax),%mm4 + movd ASM_NAME(COS9)+32,%mm5 + punpckldq %mm5,%mm5 + pfmul %mm5,%mm4 + pfsub %mm4,%mm3 + movq 32(%eax),%mm4 + movd ASM_NAME(COS9)+8,%mm5 + punpckldq %mm5,%mm5 + pfmul %mm5,%mm4 + pfsub %mm4,%mm3 + pfadd %mm1,%mm3 + movq 64(%eax),%mm4 + movd ASM_NAME(COS9)+16,%mm5 + punpckldq %mm5,%mm5 + pfmul %mm5,%mm4 + pfadd %mm4,%mm3 + movq %mm2,%mm4 + pfadd %mm3,%mm4 + movq %mm7,%mm5 + punpckldq ASM_NAME(tfcos36)+8,%mm5 + pfmul %mm5,%mm4 + movq %mm4,%mm5 + pfacc %mm5,%mm5 + movd 116(%edx),%mm6 + punpckldq 96(%edx),%mm6 + pfmul %mm6,%mm5 + movd %mm5,44(%ecx) + psrlq $32,%mm5 + movd %mm5,24(%ecx) + movq %mm4,%mm6 + punpckldq %mm6,%mm5 + pfsub %mm6,%mm5 + punpckhdq %mm5,%mm5 + movd 24(%edx),%mm6 + punpckldq 44(%edx),%mm6 + pfmul %mm6,%mm5 + movd 24(%esi),%mm6 + punpckldq 44(%esi),%mm6 + pfadd %mm6,%mm5 + movd %mm5,768(%ebx) + psrlq $32,%mm5 + movd %mm5,1408(%ebx) + movq %mm3,%mm4 + pfsub %mm2,%mm4 + movq %mm7,%mm5 + punpckldq ASM_NAME(tfcos36)+24,%mm5 + pfmul %mm5,%mm4 + movq %mm4,%mm5 + pfacc %mm5,%mm5 + movd 132(%edx),%mm6 + punpckldq 80(%edx),%mm6 + pfmul %mm6,%mm5 + movd %mm5,60(%ecx) + psrlq $32,%mm5 + movd %mm5,8(%ecx) + movq %mm4,%mm6 + punpckldq %mm6,%mm5 + pfsub %mm6,%mm5 + punpckhdq %mm5,%mm5 + movd 8(%edx),%mm6 + punpckldq 60(%edx),%mm6 + pfmul %mm6,%mm5 + movd 8(%esi),%mm6 + punpckldq 60(%esi),%mm6 + pfadd %mm6,%mm5 + movd %mm5,256(%ebx) + psrlq $32,%mm5 + movd %mm5,1920(%ebx) + movq 8(%eax),%mm2 + movd ASM_NAME(COS9)+28,%mm3 + punpckldq %mm3,%mm3 + pfmul %mm3,%mm2 + pfsub %mm0,%mm2 + movq 40(%eax),%mm3 + movd ASM_NAME(COS9)+4,%mm4 + punpckldq %mm4,%mm4 + pfmul %mm4,%mm3 + pfadd %mm3,%mm2 + movq 56(%eax),%mm3 + movd ASM_NAME(COS9)+20,%mm4 + punpckldq %mm4,%mm4 + pfmul %mm4,%mm3 + pfsub %mm3,%mm2 + movq (%eax),%mm3 + movq 16(%eax),%mm4 + movd ASM_NAME(COS9)+16,%mm5 + punpckldq %mm5,%mm5 + pfmul %mm5,%mm4 + pfsub %mm4,%mm3 + movq 32(%eax),%mm4 + movd ASM_NAME(COS9)+32,%mm5 + punpckldq %mm5,%mm5 + pfmul %mm5,%mm4 + pfadd %mm4,%mm3 + pfadd %mm1,%mm3 + movq 64(%eax),%mm4 + movd ASM_NAME(COS9)+8,%mm5 + punpckldq %mm5,%mm5 + pfmul %mm5,%mm4 + pfsub %mm4,%mm3 + movq %mm2,%mm4 + pfadd %mm3,%mm4 + movq %mm7,%mm5 + punpckldq ASM_NAME(tfcos36)+12,%mm5 + pfmul %mm5,%mm4 + movq %mm4,%mm5 + pfacc %mm5,%mm5 + movd 120(%edx),%mm6 + punpckldq 92(%edx),%mm6 + pfmul %mm6,%mm5 + movd %mm5,48(%ecx) + psrlq $32,%mm5 + movd %mm5,20(%ecx) + movq %mm4,%mm6 + punpckldq %mm6,%mm5 + pfsub %mm6,%mm5 + punpckhdq %mm5,%mm5 + movd 20(%edx),%mm6 + punpckldq 48(%edx),%mm6 + pfmul %mm6,%mm5 + movd 20(%esi),%mm6 + punpckldq 48(%esi),%mm6 + pfadd %mm6,%mm5 + movd %mm5,640(%ebx) + psrlq $32,%mm5 + movd %mm5,1536(%ebx) + movq %mm3,%mm4 + pfsub %mm2,%mm4 + movq %mm7,%mm5 + punpckldq ASM_NAME(tfcos36)+20,%mm5 + pfmul %mm5,%mm4 + movq %mm4,%mm5 + pfacc %mm5,%mm5 + movd 128(%edx),%mm6 + punpckldq 84(%edx),%mm6 + pfmul %mm6,%mm5 + movd %mm5,56(%ecx) + psrlq $32,%mm5 + movd %mm5,12(%ecx) + movq %mm4,%mm6 + punpckldq %mm6,%mm5 + pfsub %mm6,%mm5 + punpckhdq %mm5,%mm5 + movd 12(%edx),%mm6 + punpckldq 56(%edx),%mm6 + pfmul %mm6,%mm5 + movd 12(%esi),%mm6 + punpckldq 56(%esi),%mm6 + pfadd %mm6,%mm5 + movd %mm5,384(%ebx) + psrlq $32,%mm5 + movd %mm5,1792(%ebx) + + movq (%eax),%mm4 + movq 16(%eax),%mm3 + pfsub %mm3,%mm4 + movq 32(%eax),%mm3 + pfadd %mm3,%mm4 + movq 48(%eax),%mm3 + pfsub %mm3,%mm4 + movq 64(%eax),%mm3 + pfadd %mm3,%mm4 + movq %mm7,%mm5 + punpckldq ASM_NAME(tfcos36)+16,%mm5 + pfmul %mm5,%mm4 + movq %mm4,%mm5 + pfacc %mm5,%mm5 + movd 124(%edx),%mm6 + punpckldq 88(%edx),%mm6 + pfmul %mm6,%mm5 + movd %mm5,52(%ecx) + psrlq $32,%mm5 + movd %mm5,16(%ecx) + movq %mm4,%mm6 + punpckldq %mm6,%mm5 + pfsub %mm6,%mm5 + punpckhdq %mm5,%mm5 + movd 16(%edx),%mm6 + punpckldq 52(%edx),%mm6 + pfmul %mm6,%mm5 + movd 16(%esi),%mm6 + punpckldq 52(%esi),%mm6 + pfadd %mm6,%mm5 + movd %mm5,512(%ebx) + psrlq $32,%mm5 + movd %mm5,1664(%ebx) + + femms + popl %ebx + popl %esi + movl %ebp,%esp + popl %ebp + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/dct36_3dnowext.S b/deps/mpg123/src/libmpg123/dct36_3dnowext.S new file mode 100644 index 0000000..6bfacc2 --- /dev/null +++ b/deps/mpg123/src/libmpg123/dct36_3dnowext.S @@ -0,0 +1,512 @@ +/* + dct36_3dnowext: extended 3DNow optimized DCT36 + + copyright ?-2007 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + + Transformed back into standalone asm, with help of + gcc -S -DHAVE_CONFIG_H -I. -march=k6-3 -O3 -Wall -pedantic -fno-strict-aliasing -DREAL_IS_FLOAT -c -o dct36_3dnowext.{S,c} + + MPlayer comment follows. +*/ + +/* + * dct36_3dnow.c - 3DNow! optimized dct36() + * + * This code based 'dct36_3dnow.s' by Syuuhei Kashiyama + * , only two types of changes have been made: + * + * - removed PREFETCH instruction for speedup + * - changed function name for support 3DNow! automatic detection + * + * You can find Kashiyama's original 3dnow! support patch + * (for mpg123-0.59o) at + * http://user.ecc.u-tokyo.ac.jp/~g810370/linux-simd/ (Japanese). + * + * by KIMURA Takuhiro - until 31.Mar.1999 + * - after 1.Apr.1999 + * + * Modified for use with MPlayer, for details see the changelog at + * http://svn.mplayerhq.hu/mplayer/trunk/ + * $Id: dct36_3dnow.c 18786 2006-06-22 13:34:00Z diego $ + * + * Original disclaimer: + * The author of this program disclaim whole expressed or implied + * warranties with regard to this program, and in no event shall the + * author of this program liable to whatever resulted from the use of + * this program. Use it at your own risk. + * + * 2003/06/21: Moved to GCC inline assembly - Alex Beregszaszi + */ + +#include "mangle.h" + + .text + ALIGN32 +.globl ASM_NAME(dct36_3dnowext) + /* .type ASM_NAME(dct36_3dnowext), @function */ +ASM_NAME(dct36_3dnowext): + pushl %ebp + movl %esp, %ebp + pushl %esi + pushl %ebx + movl 8(%ebp), %eax + movl 12(%ebp), %esi + movl 16(%ebp), %ecx + movl 20(%ebp), %edx + movl 24(%ebp), %ebx +/* APP */ + movq (%eax),%mm0 + movq 4(%eax),%mm1 + pfadd %mm1,%mm0 + movq %mm0,4(%eax) + psrlq $32,%mm1 + movq 12(%eax),%mm2 + punpckldq %mm2,%mm1 + pfadd %mm2,%mm1 + movq %mm1,12(%eax) + psrlq $32,%mm2 + movq 20(%eax),%mm3 + punpckldq %mm3,%mm2 + pfadd %mm3,%mm2 + movq %mm2,20(%eax) + psrlq $32,%mm3 + movq 28(%eax),%mm4 + punpckldq %mm4,%mm3 + pfadd %mm4,%mm3 + movq %mm3,28(%eax) + psrlq $32,%mm4 + movq 36(%eax),%mm5 + punpckldq %mm5,%mm4 + pfadd %mm5,%mm4 + movq %mm4,36(%eax) + psrlq $32,%mm5 + movq 44(%eax),%mm6 + punpckldq %mm6,%mm5 + pfadd %mm6,%mm5 + movq %mm5,44(%eax) + psrlq $32,%mm6 + movq 52(%eax),%mm7 + punpckldq %mm7,%mm6 + pfadd %mm7,%mm6 + movq %mm6,52(%eax) + psrlq $32,%mm7 + movq 60(%eax),%mm0 + punpckldq %mm0,%mm7 + pfadd %mm0,%mm7 + movq %mm7,60(%eax) + psrlq $32,%mm0 + movd 68(%eax),%mm1 + pfadd %mm1,%mm0 + movd %mm0,68(%eax) + movd 4(%eax),%mm0 + movd 12(%eax),%mm1 + punpckldq %mm1,%mm0 + punpckldq 20(%eax),%mm1 + pfadd %mm1,%mm0 + movd %mm0,12(%eax) + psrlq $32,%mm0 + movd %mm0,20(%eax) + psrlq $32,%mm1 + movd 28(%eax),%mm2 + punpckldq %mm2,%mm1 + punpckldq 36(%eax),%mm2 + pfadd %mm2,%mm1 + movd %mm1,28(%eax) + psrlq $32,%mm1 + movd %mm1,36(%eax) + psrlq $32,%mm2 + movd 44(%eax),%mm3 + punpckldq %mm3,%mm2 + punpckldq 52(%eax),%mm3 + pfadd %mm3,%mm2 + movd %mm2,44(%eax) + psrlq $32,%mm2 + movd %mm2,52(%eax) + psrlq $32,%mm3 + movd 60(%eax),%mm4 + punpckldq %mm4,%mm3 + punpckldq 68(%eax),%mm4 + pfadd %mm4,%mm3 + movd %mm3,60(%eax) + psrlq $32,%mm3 + movd %mm3,68(%eax) + movq 24(%eax),%mm0 + movq 48(%eax),%mm1 + movd ASM_NAME(COS9)+12,%mm2 + punpckldq %mm2,%mm2 + movd ASM_NAME(COS9)+24,%mm3 + punpckldq %mm3,%mm3 + pfmul %mm2,%mm0 + pfmul %mm3,%mm1 + pushl %eax + movl $1,%eax + movd %eax,%mm7 + pi2fd %mm7,%mm7 + popl %eax + movq 8(%eax),%mm2 + movd ASM_NAME(COS9)+4,%mm3 + punpckldq %mm3,%mm3 + pfmul %mm3,%mm2 + pfadd %mm0,%mm2 + movq 40(%eax),%mm3 + movd ASM_NAME(COS9)+20,%mm4 + punpckldq %mm4,%mm4 + pfmul %mm4,%mm3 + pfadd %mm3,%mm2 + movq 56(%eax),%mm3 + movd ASM_NAME(COS9)+28,%mm4 + punpckldq %mm4,%mm4 + pfmul %mm4,%mm3 + pfadd %mm3,%mm2 + movq (%eax),%mm3 + movq 16(%eax),%mm4 + movd ASM_NAME(COS9)+8,%mm5 + punpckldq %mm5,%mm5 + pfmul %mm5,%mm4 + pfadd %mm4,%mm3 + movq 32(%eax),%mm4 + movd ASM_NAME(COS9)+16,%mm5 + punpckldq %mm5,%mm5 + pfmul %mm5,%mm4 + pfadd %mm4,%mm3 + pfadd %mm1,%mm3 + movq 64(%eax),%mm4 + movd ASM_NAME(COS9)+32,%mm5 + punpckldq %mm5,%mm5 + pfmul %mm5,%mm4 + pfadd %mm4,%mm3 + movq %mm2,%mm4 + pfadd %mm3,%mm4 + movq %mm7,%mm5 + punpckldq ASM_NAME(tfcos36)+0,%mm5 + pfmul %mm5,%mm4 + movq %mm4,%mm5 + pfacc %mm5,%mm5 + movd 108(%edx),%mm6 + punpckldq 104(%edx),%mm6 + pfmul %mm6,%mm5 + pswapd %mm5,%mm5 + movq %mm5,32(%ecx) + movq %mm4,%mm6 + punpckldq %mm6,%mm5 + pfsub %mm6,%mm5 + punpckhdq %mm5,%mm5 + movd 32(%edx),%mm6 + punpckldq 36(%edx),%mm6 + pfmul %mm6,%mm5 + movd 32(%esi),%mm6 + punpckldq 36(%esi),%mm6 + pfadd %mm6,%mm5 + movd %mm5,1024(%ebx) + psrlq $32,%mm5 + movd %mm5,1152(%ebx) + movq %mm3,%mm4 + pfsub %mm2,%mm4 + movq %mm7,%mm5 + punpckldq ASM_NAME(tfcos36)+32,%mm5 + pfmul %mm5,%mm4 + movq %mm4,%mm5 + pfacc %mm5,%mm5 + movd 140(%edx),%mm6 + punpckldq 72(%edx),%mm6 + pfmul %mm6,%mm5 + movd %mm5,68(%ecx) + psrlq $32,%mm5 + movd %mm5,0(%ecx) + movq %mm4,%mm6 + punpckldq %mm6,%mm5 + pfsub %mm6,%mm5 + punpckhdq %mm5,%mm5 + movd 0(%edx),%mm6 + punpckldq 68(%edx),%mm6 + pfmul %mm6,%mm5 + movd 0(%esi),%mm6 + punpckldq 68(%esi),%mm6 + pfadd %mm6,%mm5 + movd %mm5,0(%ebx) + psrlq $32,%mm5 + movd %mm5,2176(%ebx) + movq 8(%eax),%mm2 + movq 40(%eax),%mm3 + pfsub %mm3,%mm2 + movq 56(%eax),%mm3 + pfsub %mm3,%mm2 + movd ASM_NAME(COS9)+12,%mm3 + punpckldq %mm3,%mm3 + pfmul %mm3,%mm2 + movq 16(%eax),%mm3 + movq 32(%eax),%mm4 + pfsub %mm4,%mm3 + movq 64(%eax),%mm4 + pfsub %mm4,%mm3 + movd ASM_NAME(COS9)+24,%mm4 + punpckldq %mm4,%mm4 + pfmul %mm4,%mm3 + movq 48(%eax),%mm4 + pfsub %mm4,%mm3 + movq (%eax),%mm4 + pfadd %mm4,%mm3 + movq %mm2,%mm4 + pfadd %mm3,%mm4 + movq %mm7,%mm5 + punpckldq ASM_NAME(tfcos36)+4,%mm5 + pfmul %mm5,%mm4 + movq %mm4,%mm5 + pfacc %mm5,%mm5 + movd 112(%edx),%mm6 + punpckldq 100(%edx),%mm6 + pfmul %mm6,%mm5 + movd %mm5,40(%ecx) + psrlq $32,%mm5 + movd %mm5,28(%ecx) + movq %mm4,%mm6 + punpckldq %mm6,%mm5 + pfsub %mm6,%mm5 + punpckhdq %mm5,%mm5 + movd 28(%edx),%mm6 + punpckldq 40(%edx),%mm6 + pfmul %mm6,%mm5 + movd 28(%esi),%mm6 + punpckldq 40(%esi),%mm6 + pfadd %mm6,%mm5 + movd %mm5,896(%ebx) + psrlq $32,%mm5 + movd %mm5,1280(%ebx) + movq %mm3,%mm4 + pfsub %mm2,%mm4 + movq %mm7,%mm5 + punpckldq ASM_NAME(tfcos36)+28,%mm5 + pfmul %mm5,%mm4 + movq %mm4,%mm5 + pfacc %mm5,%mm5 + movd 136(%edx),%mm6 + punpckldq 76(%edx),%mm6 + pfmul %mm6,%mm5 + movd %mm5,64(%ecx) + psrlq $32,%mm5 + movd %mm5,4(%ecx) + movq %mm4,%mm6 + punpckldq %mm6,%mm5 + pfsub %mm6,%mm5 + punpckhdq %mm5,%mm5 + movd 4(%edx),%mm6 + punpckldq 64(%edx),%mm6 + pfmul %mm6,%mm5 + movd 4(%esi),%mm6 + punpckldq 64(%esi),%mm6 + pfadd %mm6,%mm5 + movd %mm5,128(%ebx) + psrlq $32,%mm5 + movd %mm5,2048(%ebx) + movq 8(%eax),%mm2 + movd ASM_NAME(COS9)+20,%mm3 + punpckldq %mm3,%mm3 + pfmul %mm3,%mm2 + pfsub %mm0,%mm2 + movq 40(%eax),%mm3 + movd ASM_NAME(COS9)+28,%mm4 + punpckldq %mm4,%mm4 + pfmul %mm4,%mm3 + pfsub %mm3,%mm2 + movq 56(%eax),%mm3 + movd ASM_NAME(COS9)+4,%mm4 + punpckldq %mm4,%mm4 + pfmul %mm4,%mm3 + pfadd %mm3,%mm2 + movq (%eax),%mm3 + movq 16(%eax),%mm4 + movd ASM_NAME(COS9)+32,%mm5 + punpckldq %mm5,%mm5 + pfmul %mm5,%mm4 + pfsub %mm4,%mm3 + movq 32(%eax),%mm4 + movd ASM_NAME(COS9)+8,%mm5 + punpckldq %mm5,%mm5 + pfmul %mm5,%mm4 + pfsub %mm4,%mm3 + pfadd %mm1,%mm3 + movq 64(%eax),%mm4 + movd ASM_NAME(COS9)+16,%mm5 + punpckldq %mm5,%mm5 + pfmul %mm5,%mm4 + pfadd %mm4,%mm3 + movq %mm2,%mm4 + pfadd %mm3,%mm4 + movq %mm7,%mm5 + punpckldq ASM_NAME(tfcos36)+8,%mm5 + pfmul %mm5,%mm4 + movq %mm4,%mm5 + pfacc %mm5,%mm5 + movd 116(%edx),%mm6 + punpckldq 96(%edx),%mm6 + pfmul %mm6,%mm5 + movd %mm5,44(%ecx) + psrlq $32,%mm5 + movd %mm5,24(%ecx) + movq %mm4,%mm6 + punpckldq %mm6,%mm5 + pfsub %mm6,%mm5 + punpckhdq %mm5,%mm5 + movd 24(%edx),%mm6 + punpckldq 44(%edx),%mm6 + pfmul %mm6,%mm5 + movd 24(%esi),%mm6 + punpckldq 44(%esi),%mm6 + pfadd %mm6,%mm5 + movd %mm5,768(%ebx) + psrlq $32,%mm5 + movd %mm5,1408(%ebx) + movq %mm3,%mm4 + pfsub %mm2,%mm4 + movq %mm7,%mm5 + punpckldq ASM_NAME(tfcos36)+24,%mm5 + pfmul %mm5,%mm4 + movq %mm4,%mm5 + pfacc %mm5,%mm5 + movd 132(%edx),%mm6 + punpckldq 80(%edx),%mm6 + pfmul %mm6,%mm5 + movd %mm5,60(%ecx) + psrlq $32,%mm5 + movd %mm5,8(%ecx) + movq %mm4,%mm6 + punpckldq %mm6,%mm5 + pfsub %mm6,%mm5 + punpckhdq %mm5,%mm5 + movd 8(%edx),%mm6 + punpckldq 60(%edx),%mm6 + pfmul %mm6,%mm5 + movd 8(%esi),%mm6 + punpckldq 60(%esi),%mm6 + pfadd %mm6,%mm5 + movd %mm5,256(%ebx) + psrlq $32,%mm5 + movd %mm5,1920(%ebx) + movq 8(%eax),%mm2 + movd ASM_NAME(COS9)+28,%mm3 + punpckldq %mm3,%mm3 + pfmul %mm3,%mm2 + pfsub %mm0,%mm2 + movq 40(%eax),%mm3 + movd ASM_NAME(COS9)+4,%mm4 + punpckldq %mm4,%mm4 + pfmul %mm4,%mm3 + pfadd %mm3,%mm2 + movq 56(%eax),%mm3 + movd ASM_NAME(COS9)+20,%mm4 + punpckldq %mm4,%mm4 + pfmul %mm4,%mm3 + pfsub %mm3,%mm2 + movq (%eax),%mm3 + movq 16(%eax),%mm4 + movd ASM_NAME(COS9)+16,%mm5 + punpckldq %mm5,%mm5 + pfmul %mm5,%mm4 + pfsub %mm4,%mm3 + movq 32(%eax),%mm4 + movd ASM_NAME(COS9)+32,%mm5 + punpckldq %mm5,%mm5 + pfmul %mm5,%mm4 + pfadd %mm4,%mm3 + pfadd %mm1,%mm3 + movq 64(%eax),%mm4 + movd ASM_NAME(COS9)+8,%mm5 + punpckldq %mm5,%mm5 + pfmul %mm5,%mm4 + pfsub %mm4,%mm3 + movq %mm2,%mm4 + pfadd %mm3,%mm4 + movq %mm7,%mm5 + punpckldq ASM_NAME(tfcos36)+12,%mm5 + pfmul %mm5,%mm4 + movq %mm4,%mm5 + pfacc %mm5,%mm5 + movd 120(%edx),%mm6 + punpckldq 92(%edx),%mm6 + pfmul %mm6,%mm5 + movd %mm5,48(%ecx) + psrlq $32,%mm5 + movd %mm5,20(%ecx) + movq %mm4,%mm6 + punpckldq %mm6,%mm5 + pfsub %mm6,%mm5 + punpckhdq %mm5,%mm5 + movd 20(%edx),%mm6 + punpckldq 48(%edx),%mm6 + pfmul %mm6,%mm5 + movd 20(%esi),%mm6 + punpckldq 48(%esi),%mm6 + pfadd %mm6,%mm5 + movd %mm5,640(%ebx) + psrlq $32,%mm5 + movd %mm5,1536(%ebx) + movq %mm3,%mm4 + pfsub %mm2,%mm4 + movq %mm7,%mm5 + punpckldq ASM_NAME(tfcos36)+20,%mm5 + pfmul %mm5,%mm4 + movq %mm4,%mm5 + pfacc %mm5,%mm5 + movd 128(%edx),%mm6 + punpckldq 84(%edx),%mm6 + pfmul %mm6,%mm5 + movd %mm5,56(%ecx) + psrlq $32,%mm5 + movd %mm5,12(%ecx) + movq %mm4,%mm6 + punpckldq %mm6,%mm5 + pfsub %mm6,%mm5 + punpckhdq %mm5,%mm5 + movd 12(%edx),%mm6 + punpckldq 56(%edx),%mm6 + pfmul %mm6,%mm5 + movd 12(%esi),%mm6 + punpckldq 56(%esi),%mm6 + pfadd %mm6,%mm5 + movd %mm5,384(%ebx) + psrlq $32,%mm5 + movd %mm5,1792(%ebx) + movq (%eax),%mm4 + movq 16(%eax),%mm3 + pfsub %mm3,%mm4 + movq 32(%eax),%mm3 + pfadd %mm3,%mm4 + movq 48(%eax),%mm3 + pfsub %mm3,%mm4 + movq 64(%eax),%mm3 + pfadd %mm3,%mm4 + movq %mm7,%mm5 + punpckldq ASM_NAME(tfcos36)+16,%mm5 + pfmul %mm5,%mm4 + movq %mm4,%mm5 + pfacc %mm5,%mm5 + movd 124(%edx),%mm6 + punpckldq 88(%edx),%mm6 + pfmul %mm6,%mm5 + movd %mm5,52(%ecx) + psrlq $32,%mm5 + movd %mm5,16(%ecx) + movq %mm4,%mm6 + punpckldq %mm6,%mm5 + pfsub %mm6,%mm5 + punpckhdq %mm5,%mm5 + movd 16(%edx),%mm6 + punpckldq 52(%edx),%mm6 + pfmul %mm6,%mm5 + movd 16(%esi),%mm6 + punpckldq 52(%esi),%mm6 + pfadd %mm6,%mm5 + movd %mm5,512(%ebx) + psrlq $32,%mm5 + movd %mm5,1664(%ebx) + femms + +/* NO_APP */ + popl %ebx + popl %esi + leave + ret + /* .size ASM_NAME(dct36_3dnowext), .-ASM_NAME(dct36_3dnowext) */ + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/dct64.c b/deps/mpg123/src/libmpg123/dct64.c new file mode 100644 index 0000000..a25047a --- /dev/null +++ b/deps/mpg123/src/libmpg123/dct64.c @@ -0,0 +1,174 @@ +/* + dct64.c: DCT64, the plain C version + + copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Michael Hipp +*/ + +/* + * Discrete Cosine Tansform (DCT) for subband synthesis + * + * -funroll-loops (for gcc) will remove the loops for better performance + * using loops in the source-code enhances readabillity + * + * + * TODO: write an optimized version for the down-sampling modes + * (in these modes the bands 16-31 (2:1) or 8-31 (4:1) are zero + */ + +#include "mpg123lib_intern.h" + +void dct64(real *out0,real *out1,real *samples) +{ + real bufs[64]; + + { + register int i,j; + register real *b1,*b2,*bs,*costab; + + b1 = samples; + bs = bufs; + costab = pnts[0]+16; + b2 = b1 + 32; + + for(i=15;i>=0;i--) + *bs++ = (*b1++ + *--b2); + for(i=15;i>=0;i--) + *bs++ = REAL_MUL((*--b2 - *b1++), *--costab); + + b1 = bufs; + costab = pnts[1]+8; + b2 = b1 + 16; + + { + for(i=7;i>=0;i--) + *bs++ = (*b1++ + *--b2); + for(i=7;i>=0;i--) + *bs++ = REAL_MUL((*--b2 - *b1++), *--costab); + b2 += 32; + costab += 8; + for(i=7;i>=0;i--) + *bs++ = (*b1++ + *--b2); + for(i=7;i>=0;i--) + *bs++ = REAL_MUL((*b1++ - *--b2), *--costab); + b2 += 32; + } + + bs = bufs; + costab = pnts[2]; + b2 = b1 + 8; + + for(j=2;j;j--) + { + for(i=3;i>=0;i--) + *bs++ = (*b1++ + *--b2); + for(i=3;i>=0;i--) + *bs++ = REAL_MUL((*--b2 - *b1++), costab[i]); + b2 += 16; + for(i=3;i>=0;i--) + *bs++ = (*b1++ + *--b2); + for(i=3;i>=0;i--) + *bs++ = REAL_MUL((*b1++ - *--b2), costab[i]); + b2 += 16; + } + + b1 = bufs; + costab = pnts[3]; + b2 = b1 + 4; + + for(j=4;j;j--) + { + *bs++ = (*b1++ + *--b2); + *bs++ = (*b1++ + *--b2); + *bs++ = REAL_MUL((*--b2 - *b1++), costab[1]); + *bs++ = REAL_MUL((*--b2 - *b1++), costab[0]); + b2 += 8; + *bs++ = (*b1++ + *--b2); + *bs++ = (*b1++ + *--b2); + *bs++ = REAL_MUL((*b1++ - *--b2), costab[1]); + *bs++ = REAL_MUL((*b1++ - *--b2), costab[0]); + b2 += 8; + } + bs = bufs; + costab = pnts[4]; + + for(j=8;j;j--) + { + real v0,v1; + v0=*b1++; v1 = *b1++; + *bs++ = (v0 + v1); + *bs++ = REAL_MUL((v0 - v1), (*costab)); + v0=*b1++; v1 = *b1++; + *bs++ = (v0 + v1); + *bs++ = REAL_MUL((v1 - v0), (*costab)); + } + + } + + + { + register real *b1; + register int i; + + for(b1=bufs,i=8;i;i--,b1+=4) + b1[2] += b1[3]; + + for(b1=bufs,i=4;i;i--,b1+=8) + { + b1[4] += b1[6]; + b1[6] += b1[5]; + b1[5] += b1[7]; + } + + for(b1=bufs,i=2;i;i--,b1+=16) + { + b1[8] += b1[12]; + b1[12] += b1[10]; + b1[10] += b1[14]; + b1[14] += b1[9]; + b1[9] += b1[13]; + b1[13] += b1[11]; + b1[11] += b1[15]; + } + } + + + out0[0x10*16] = REAL_SCALE_DCT64(bufs[0]); + out0[0x10*15] = REAL_SCALE_DCT64(bufs[16+0] + bufs[16+8]); + out0[0x10*14] = REAL_SCALE_DCT64(bufs[8]); + out0[0x10*13] = REAL_SCALE_DCT64(bufs[16+8] + bufs[16+4]); + out0[0x10*12] = REAL_SCALE_DCT64(bufs[4]); + out0[0x10*11] = REAL_SCALE_DCT64(bufs[16+4] + bufs[16+12]); + out0[0x10*10] = REAL_SCALE_DCT64(bufs[12]); + out0[0x10* 9] = REAL_SCALE_DCT64(bufs[16+12] + bufs[16+2]); + out0[0x10* 8] = REAL_SCALE_DCT64(bufs[2]); + out0[0x10* 7] = REAL_SCALE_DCT64(bufs[16+2] + bufs[16+10]); + out0[0x10* 6] = REAL_SCALE_DCT64(bufs[10]); + out0[0x10* 5] = REAL_SCALE_DCT64(bufs[16+10] + bufs[16+6]); + out0[0x10* 4] = REAL_SCALE_DCT64(bufs[6]); + out0[0x10* 3] = REAL_SCALE_DCT64(bufs[16+6] + bufs[16+14]); + out0[0x10* 2] = REAL_SCALE_DCT64(bufs[14]); + out0[0x10* 1] = REAL_SCALE_DCT64(bufs[16+14] + bufs[16+1]); + out0[0x10* 0] = REAL_SCALE_DCT64(bufs[1]); + + out1[0x10* 0] = REAL_SCALE_DCT64(bufs[1]); + out1[0x10* 1] = REAL_SCALE_DCT64(bufs[16+1] + bufs[16+9]); + out1[0x10* 2] = REAL_SCALE_DCT64(bufs[9]); + out1[0x10* 3] = REAL_SCALE_DCT64(bufs[16+9] + bufs[16+5]); + out1[0x10* 4] = REAL_SCALE_DCT64(bufs[5]); + out1[0x10* 5] = REAL_SCALE_DCT64(bufs[16+5] + bufs[16+13]); + out1[0x10* 6] = REAL_SCALE_DCT64(bufs[13]); + out1[0x10* 7] = REAL_SCALE_DCT64(bufs[16+13] + bufs[16+3]); + out1[0x10* 8] = REAL_SCALE_DCT64(bufs[3]); + out1[0x10* 9] = REAL_SCALE_DCT64(bufs[16+3] + bufs[16+11]); + out1[0x10*10] = REAL_SCALE_DCT64(bufs[11]); + out1[0x10*11] = REAL_SCALE_DCT64(bufs[16+11] + bufs[16+7]); + out1[0x10*12] = REAL_SCALE_DCT64(bufs[7]); + out1[0x10*13] = REAL_SCALE_DCT64(bufs[16+7] + bufs[16+15]); + out1[0x10*14] = REAL_SCALE_DCT64(bufs[15]); + out1[0x10*15] = REAL_SCALE_DCT64(bufs[16+15]); + +} + + diff --git a/deps/mpg123/src/libmpg123/dct64_3dnow.S b/deps/mpg123/src/libmpg123/dct64_3dnow.S new file mode 100644 index 0000000..cd6060b --- /dev/null +++ b/deps/mpg123/src/libmpg123/dct64_3dnow.S @@ -0,0 +1,712 @@ +/* + dct64_3dnow.s: Replacement of dct64() with AMD's 3DNow! SIMD operations support + + copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Syuuhei Kashiyama + + Original "license" statement: + The author of this program disclaim whole expressed or implied + warranties with regard to this program, and in no event shall the + author of this program liable to whatever resulted from the use of + this program. Use it at your own risk. +*/ + +#include "mangle.h" + + .globl ASM_NAME(dct64_3dnow) +/* .type ASM_NAME(dct64_3dnow),@function */ +ASM_NAME(dct64_3dnow): + subl $256,%esp + pushl %ebp + pushl %edi + pushl %esi + pushl %ebx + leal 16(%esp),%ebx + movl 284(%esp),%edi + movl 276(%esp),%ebp + movl 280(%esp),%edx + leal 128(%ebx),%esi + + /* femms */ + + /* 1 */ + movl ASM_NAME(pnts),%eax + movq 0(%edi),%mm0 + movq %mm0,%mm1 + movd 124(%edi),%mm2 + punpckldq 120(%edi),%mm2 + movq 0(%eax),%mm3 + pfadd %mm2,%mm0 + movq %mm0,0(%ebx) + pfsub %mm2,%mm1 + pfmul %mm3,%mm1 + movd %mm1,124(%ebx) + psrlq $32,%mm1 + movd %mm1,120(%ebx) + movq 8(%edi),%mm4 + movq %mm4,%mm5 + movd 116(%edi),%mm6 + punpckldq 112(%edi),%mm6 + movq 8(%eax),%mm7 + pfadd %mm6,%mm4 + movq %mm4,8(%ebx) + pfsub %mm6,%mm5 + pfmul %mm7,%mm5 + movd %mm5,116(%ebx) + psrlq $32,%mm5 + movd %mm5,112(%ebx) + movq 16(%edi),%mm0 + movq %mm0,%mm1 + movd 108(%edi),%mm2 + punpckldq 104(%edi),%mm2 + movq 16(%eax),%mm3 + pfadd %mm2,%mm0 + movq %mm0,16(%ebx) + pfsub %mm2,%mm1 + pfmul %mm3,%mm1 + movd %mm1,108(%ebx) + psrlq $32,%mm1 + movd %mm1,104(%ebx) + movq 24(%edi),%mm4 + movq %mm4,%mm5 + movd 100(%edi),%mm6 + punpckldq 96(%edi),%mm6 + movq 24(%eax),%mm7 + pfadd %mm6,%mm4 + movq %mm4,24(%ebx) + pfsub %mm6,%mm5 + pfmul %mm7,%mm5 + movd %mm5,100(%ebx) + psrlq $32,%mm5 + movd %mm5,96(%ebx) + movq 32(%edi),%mm0 + movq %mm0,%mm1 + movd 92(%edi),%mm2 + punpckldq 88(%edi),%mm2 + movq 32(%eax),%mm3 + pfadd %mm2,%mm0 + movq %mm0,32(%ebx) + pfsub %mm2,%mm1 + pfmul %mm3,%mm1 + movd %mm1,92(%ebx) + psrlq $32,%mm1 + movd %mm1,88(%ebx) + movq 40(%edi),%mm4 + movq %mm4,%mm5 + movd 84(%edi),%mm6 + punpckldq 80(%edi),%mm6 + movq 40(%eax),%mm7 + pfadd %mm6,%mm4 + movq %mm4,40(%ebx) + pfsub %mm6,%mm5 + pfmul %mm7,%mm5 + movd %mm5,84(%ebx) + psrlq $32,%mm5 + movd %mm5,80(%ebx) + movq 48(%edi),%mm0 + movq %mm0,%mm1 + movd 76(%edi),%mm2 + punpckldq 72(%edi),%mm2 + movq 48(%eax),%mm3 + pfadd %mm2,%mm0 + movq %mm0,48(%ebx) + pfsub %mm2,%mm1 + pfmul %mm3,%mm1 + movd %mm1,76(%ebx) + psrlq $32,%mm1 + movd %mm1,72(%ebx) + movq 56(%edi),%mm4 + movq %mm4,%mm5 + movd 68(%edi),%mm6 + punpckldq 64(%edi),%mm6 + movq 56(%eax),%mm7 + pfadd %mm6,%mm4 + movq %mm4,56(%ebx) + pfsub %mm6,%mm5 + pfmul %mm7,%mm5 + movd %mm5,68(%ebx) + psrlq $32,%mm5 + movd %mm5,64(%ebx) + + /* 2 */ + movl ASM_NAME(pnts)+4,%eax + /* 0,14 */ + movq 0(%ebx),%mm0 + movq %mm0,%mm1 + movd 60(%ebx),%mm2 + punpckldq 56(%ebx),%mm2 + movq 0(%eax),%mm3 + pfadd %mm2,%mm0 + movq %mm0,0(%esi) + pfsub %mm2,%mm1 + pfmul %mm3,%mm1 + movd %mm1,60(%esi) + psrlq $32,%mm1 + movd %mm1,56(%esi) + /* 16,30 */ + movq 64(%ebx),%mm0 + movq %mm0,%mm1 + movd 124(%ebx),%mm2 + punpckldq 120(%ebx),%mm2 + pfadd %mm2,%mm0 + movq %mm0,64(%esi) + pfsubr %mm2,%mm1 + pfmul %mm3,%mm1 + movd %mm1,124(%esi) + psrlq $32,%mm1 + movd %mm1,120(%esi) + /* 2,12 */ + movq 8(%ebx),%mm4 + movq %mm4,%mm5 + movd 52(%ebx),%mm6 + punpckldq 48(%ebx),%mm6 + movq 8(%eax),%mm7 + pfadd %mm6,%mm4 + movq %mm4,8(%esi) + pfsub %mm6,%mm5 + pfmul %mm7,%mm5 + movd %mm5,52(%esi) + psrlq $32,%mm5 + movd %mm5,48(%esi) + /* 18,28 */ + movq 72(%ebx),%mm4 + movq %mm4,%mm5 + movd 116(%ebx),%mm6 + punpckldq 112(%ebx),%mm6 + pfadd %mm6,%mm4 + movq %mm4,72(%esi) + pfsubr %mm6,%mm5 + pfmul %mm7,%mm5 + movd %mm5,116(%esi) + psrlq $32,%mm5 + movd %mm5,112(%esi) + /* 4,10 */ + movq 16(%ebx),%mm0 + movq %mm0,%mm1 + movd 44(%ebx),%mm2 + punpckldq 40(%ebx),%mm2 + movq 16(%eax),%mm3 + pfadd %mm2,%mm0 + movq %mm0,16(%esi) + pfsub %mm2,%mm1 + pfmul %mm3,%mm1 + movd %mm1,44(%esi) + psrlq $32,%mm1 + movd %mm1,40(%esi) + /* 20,26 */ + movq 80(%ebx),%mm0 + movq %mm0,%mm1 + movd 108(%ebx),%mm2 + punpckldq 104(%ebx),%mm2 + pfadd %mm2,%mm0 + movq %mm0,80(%esi) + pfsubr %mm2,%mm1 + pfmul %mm3,%mm1 + movd %mm1,108(%esi) + psrlq $32,%mm1 + movd %mm1,104(%esi) + /* 6,8 */ + movq 24(%ebx),%mm4 + movq %mm4,%mm5 + movd 36(%ebx),%mm6 + punpckldq 32(%ebx),%mm6 + movq 24(%eax),%mm7 + pfadd %mm6,%mm4 + movq %mm4,24(%esi) + pfsub %mm6,%mm5 + pfmul %mm7,%mm5 + movd %mm5,36(%esi) + psrlq $32,%mm5 + movd %mm5,32(%esi) + /* 22,24 */ + movq 88(%ebx),%mm4 + movq %mm4,%mm5 + movd 100(%ebx),%mm6 + punpckldq 96(%ebx),%mm6 + pfadd %mm6,%mm4 + movq %mm4,88(%esi) + pfsubr %mm6,%mm5 + pfmul %mm7,%mm5 + movd %mm5,100(%esi) + psrlq $32,%mm5 + movd %mm5,96(%esi) + + /* 3 */ + movl ASM_NAME(pnts)+8,%eax + movq 0(%eax),%mm0 + movq 8(%eax),%mm1 + /* 0,6 */ + movq 0(%esi),%mm2 + movq %mm2,%mm3 + movd 28(%esi),%mm4 + punpckldq 24(%esi),%mm4 + pfadd %mm4,%mm2 + pfsub %mm4,%mm3 + pfmul %mm0,%mm3 + movq %mm2,0(%ebx) + movd %mm3,28(%ebx) + psrlq $32,%mm3 + movd %mm3,24(%ebx) + /* 2,4 */ + movq 8(%esi),%mm5 + movq %mm5,%mm6 + movd 20(%esi),%mm7 + punpckldq 16(%esi),%mm7 + pfadd %mm7,%mm5 + pfsub %mm7,%mm6 + pfmul %mm1,%mm6 + movq %mm5,8(%ebx) + movd %mm6,20(%ebx) + psrlq $32,%mm6 + movd %mm6,16(%ebx) + /* 8,14 */ + movq 32(%esi),%mm2 + movq %mm2,%mm3 + movd 60(%esi),%mm4 + punpckldq 56(%esi),%mm4 + pfadd %mm4,%mm2 + pfsubr %mm4,%mm3 + pfmul %mm0,%mm3 + movq %mm2,32(%ebx) + movd %mm3,60(%ebx) + psrlq $32,%mm3 + movd %mm3,56(%ebx) + /* 10,12 */ + movq 40(%esi),%mm5 + movq %mm5,%mm6 + movd 52(%esi),%mm7 + punpckldq 48(%esi),%mm7 + pfadd %mm7,%mm5 + pfsubr %mm7,%mm6 + pfmul %mm1,%mm6 + movq %mm5,40(%ebx) + movd %mm6,52(%ebx) + psrlq $32,%mm6 + movd %mm6,48(%ebx) + /* 16,22 */ + movq 64(%esi),%mm2 + movq %mm2,%mm3 + movd 92(%esi),%mm4 + punpckldq 88(%esi),%mm4 + pfadd %mm4,%mm2 + pfsub %mm4,%mm3 + pfmul %mm0,%mm3 + movq %mm2,64(%ebx) + movd %mm3,92(%ebx) + psrlq $32,%mm3 + movd %mm3,88(%ebx) + /* 18,20 */ + movq 72(%esi),%mm5 + movq %mm5,%mm6 + movd 84(%esi),%mm7 + punpckldq 80(%esi),%mm7 + pfadd %mm7,%mm5 + pfsub %mm7,%mm6 + pfmul %mm1,%mm6 + movq %mm5,72(%ebx) + movd %mm6,84(%ebx) + psrlq $32,%mm6 + movd %mm6,80(%ebx) + /* 24,30 */ + movq 96(%esi),%mm2 + movq %mm2,%mm3 + movd 124(%esi),%mm4 + punpckldq 120(%esi),%mm4 + pfadd %mm4,%mm2 + pfsubr %mm4,%mm3 + pfmul %mm0,%mm3 + movq %mm2,96(%ebx) + movd %mm3,124(%ebx) + psrlq $32,%mm3 + movd %mm3,120(%ebx) + /* 26,28 */ + movq 104(%esi),%mm5 + movq %mm5,%mm6 + movd 116(%esi),%mm7 + punpckldq 112(%esi),%mm7 + pfadd %mm7,%mm5 + pfsubr %mm7,%mm6 + pfmul %mm1,%mm6 + movq %mm5,104(%ebx) + movd %mm6,116(%ebx) + psrlq $32,%mm6 + movd %mm6,112(%ebx) + + /* 4 */ + movl ASM_NAME(pnts)+12,%eax + movq 0(%eax),%mm0 + /* 0 */ + movq 0(%ebx),%mm1 + movq %mm1,%mm2 + movd 12(%ebx),%mm3 + punpckldq 8(%ebx),%mm3 + pfadd %mm3,%mm1 + pfsub %mm3,%mm2 + pfmul %mm0,%mm2 + movq %mm1,0(%esi) + movd %mm2,12(%esi) + psrlq $32,%mm2 + movd %mm2,8(%esi) + /* 4 */ + movq 16(%ebx),%mm4 + movq %mm4,%mm5 + movd 28(%ebx),%mm6 + punpckldq 24(%ebx),%mm6 + pfadd %mm6,%mm4 + pfsubr %mm6,%mm5 + pfmul %mm0,%mm5 + movq %mm4,16(%esi) + movd %mm5,28(%esi) + psrlq $32,%mm5 + movd %mm5,24(%esi) + /* 8 */ + movq 32(%ebx),%mm1 + movq %mm1,%mm2 + movd 44(%ebx),%mm3 + punpckldq 40(%ebx),%mm3 + pfadd %mm3,%mm1 + pfsub %mm3,%mm2 + pfmul %mm0,%mm2 + movq %mm1,32(%esi) + movd %mm2,44(%esi) + psrlq $32,%mm2 + movd %mm2,40(%esi) + /* 12 */ + movq 48(%ebx),%mm4 + movq %mm4,%mm5 + movd 60(%ebx),%mm6 + punpckldq 56(%ebx),%mm6 + pfadd %mm6,%mm4 + pfsubr %mm6,%mm5 + pfmul %mm0,%mm5 + movq %mm4,48(%esi) + movd %mm5,60(%esi) + psrlq $32,%mm5 + movd %mm5,56(%esi) + /* 16 */ + movq 64(%ebx),%mm1 + movq %mm1,%mm2 + movd 76(%ebx),%mm3 + punpckldq 72(%ebx),%mm3 + pfadd %mm3,%mm1 + pfsub %mm3,%mm2 + pfmul %mm0,%mm2 + movq %mm1,64(%esi) + movd %mm2,76(%esi) + psrlq $32,%mm2 + movd %mm2,72(%esi) + /* 20 */ + movq 80(%ebx),%mm4 + movq %mm4,%mm5 + movd 92(%ebx),%mm6 + punpckldq 88(%ebx),%mm6 + pfadd %mm6,%mm4 + pfsubr %mm6,%mm5 + pfmul %mm0,%mm5 + movq %mm4,80(%esi) + movd %mm5,92(%esi) + psrlq $32,%mm5 + movd %mm5,88(%esi) + /* 24 */ + movq 96(%ebx),%mm1 + movq %mm1,%mm2 + movd 108(%ebx),%mm3 + punpckldq 104(%ebx),%mm3 + pfadd %mm3,%mm1 + pfsub %mm3,%mm2 + pfmul %mm0,%mm2 + movq %mm1,96(%esi) + movd %mm2,108(%esi) + psrlq $32,%mm2 + movd %mm2,104(%esi) + /* 28 */ + movq 112(%ebx),%mm4 + movq %mm4,%mm5 + movd 124(%ebx),%mm6 + punpckldq 120(%ebx),%mm6 + pfadd %mm6,%mm4 + pfsubr %mm6,%mm5 + pfmul %mm0,%mm5 + movq %mm4,112(%esi) + movd %mm5,124(%esi) + psrlq $32,%mm5 + movd %mm5,120(%esi) + + /* 5 */ + movl $-1,%eax + movd %eax,%mm1 + movl $1,%eax + /* L | H */ + movd %eax,%mm0 + punpckldq %mm1,%mm0 + /* 1.0 | -1.0 */ + pi2fd %mm0,%mm0 + movd %eax,%mm1 + pi2fd %mm1,%mm1 + movl ASM_NAME(pnts)+16,%eax + movd 0(%eax),%mm2 + /* 1.0 | cos0 */ + punpckldq %mm2,%mm1 + /* 0 */ + movq 0(%esi),%mm2 + movq %mm2,%mm3 + pfmul %mm0,%mm3 + pfacc %mm3,%mm2 + pfmul %mm1,%mm2 + movq %mm2,0(%ebx) + movq 8(%esi),%mm4 + movq %mm4,%mm5 + pfmul %mm0,%mm5 + pfacc %mm5,%mm4 + pfmul %mm0,%mm4 + pfmul %mm1,%mm4 + movq %mm4,%mm5 + psrlq $32,%mm5 + pfacc %mm5,%mm4 + movq %mm4,8(%ebx) + /* 4 */ + movq 16(%esi),%mm2 + movq %mm2,%mm3 + pfmul %mm0,%mm3 + pfacc %mm3,%mm2 + pfmul %mm1,%mm2 + movq 24(%esi),%mm4 + movq %mm4,%mm5 + pfmul %mm0,%mm5 + pfacc %mm5,%mm4 + pfmul %mm0,%mm4 + pfmul %mm1,%mm4 + movq %mm4,%mm5 + psrlq $32,%mm5 + pfacc %mm5,%mm4 + movq %mm2,%mm3 + psrlq $32,%mm3 + pfadd %mm4,%mm2 + pfadd %mm3,%mm4 + movq %mm2,16(%ebx) + movq %mm4,24(%ebx) + /* 8 */ + movq 32(%esi),%mm2 + movq %mm2,%mm3 + pfmul %mm0,%mm3 + pfacc %mm3,%mm2 + pfmul %mm1,%mm2 + movq %mm2,32(%ebx) + movq 40(%esi),%mm4 + movq %mm4,%mm5 + pfmul %mm0,%mm5 + pfacc %mm5,%mm4 + pfmul %mm0,%mm4 + pfmul %mm1,%mm4 + movq %mm4,%mm5 + psrlq $32,%mm5 + pfacc %mm5,%mm4 + movq %mm4,40(%ebx) + /* 12 */ + movq 48(%esi),%mm2 + movq %mm2,%mm3 + pfmul %mm0,%mm3 + pfacc %mm3,%mm2 + pfmul %mm1,%mm2 + movq 56(%esi),%mm4 + movq %mm4,%mm5 + pfmul %mm0,%mm5 + pfacc %mm5,%mm4 + pfmul %mm0,%mm4 + pfmul %mm1,%mm4 + movq %mm4,%mm5 + psrlq $32,%mm5 + pfacc %mm5,%mm4 + movq %mm2,%mm3 + psrlq $32,%mm3 + pfadd %mm4,%mm2 + pfadd %mm3,%mm4 + movq %mm2,48(%ebx) + movq %mm4,56(%ebx) + /* 16 */ + movq 64(%esi),%mm2 + movq %mm2,%mm3 + pfmul %mm0,%mm3 + pfacc %mm3,%mm2 + pfmul %mm1,%mm2 + movq %mm2,64(%ebx) + movq 72(%esi),%mm4 + movq %mm4,%mm5 + pfmul %mm0,%mm5 + pfacc %mm5,%mm4 + pfmul %mm0,%mm4 + pfmul %mm1,%mm4 + movq %mm4,%mm5 + psrlq $32,%mm5 + pfacc %mm5,%mm4 + movq %mm4,72(%ebx) + /* 20 */ + movq 80(%esi),%mm2 + movq %mm2,%mm3 + pfmul %mm0,%mm3 + pfacc %mm3,%mm2 + pfmul %mm1,%mm2 + movq 88(%esi),%mm4 + movq %mm4,%mm5 + pfmul %mm0,%mm5 + pfacc %mm5,%mm4 + pfmul %mm0,%mm4 + pfmul %mm1,%mm4 + movq %mm4,%mm5 + psrlq $32,%mm5 + pfacc %mm5,%mm4 + movq %mm2,%mm3 + psrlq $32,%mm3 + pfadd %mm4,%mm2 + pfadd %mm3,%mm4 + movq %mm2,80(%ebx) + movq %mm4,88(%ebx) + /* 24 */ + movq 96(%esi),%mm2 + movq %mm2,%mm3 + pfmul %mm0,%mm3 + pfacc %mm3,%mm2 + pfmul %mm1,%mm2 + movq %mm2,96(%ebx) + movq 104(%esi),%mm4 + movq %mm4,%mm5 + pfmul %mm0,%mm5 + pfacc %mm5,%mm4 + pfmul %mm0,%mm4 + pfmul %mm1,%mm4 + movq %mm4,%mm5 + psrlq $32,%mm5 + pfacc %mm5,%mm4 + movq %mm4,104(%ebx) + /* 28 */ + movq 112(%esi),%mm2 + movq %mm2,%mm3 + pfmul %mm0,%mm3 + pfacc %mm3,%mm2 + pfmul %mm1,%mm2 + movq 120(%esi),%mm4 + movq %mm4,%mm5 + pfmul %mm0,%mm5 + pfacc %mm5,%mm4 + pfmul %mm0,%mm4 + pfmul %mm1,%mm4 + movq %mm4,%mm5 + psrlq $32,%mm5 + pfacc %mm5,%mm4 + movq %mm2,%mm3 + psrlq $32,%mm3 + pfadd %mm4,%mm2 + pfadd %mm3,%mm4 + movq %mm2,112(%ebx) + movq %mm4,120(%ebx) + + /* Phase6 */ + movl 0(%ebx),%eax + movl %eax,1024(%ebp) + movl 4(%ebx),%eax + movl %eax,0(%ebp) + movl %eax,0(%edx) + movl 8(%ebx),%eax + movl %eax,512(%ebp) + movl 12(%ebx),%eax + movl %eax,512(%edx) + + movl 16(%ebx),%eax + movl %eax,768(%ebp) + movl 20(%ebx),%eax + movl %eax,256(%edx) + + movl 24(%ebx),%eax + movl %eax,256(%ebp) + movl 28(%ebx),%eax + movl %eax,768(%edx) + + movq 32(%ebx),%mm0 + movq 48(%ebx),%mm1 + pfadd %mm1,%mm0 + movd %mm0,896(%ebp) + psrlq $32,%mm0 + movd %mm0,128(%edx) + movq 40(%ebx),%mm2 + pfadd %mm2,%mm1 + movd %mm1,640(%ebp) + psrlq $32,%mm1 + movd %mm1,384(%edx) + + movq 56(%ebx),%mm3 + pfadd %mm3,%mm2 + movd %mm2,384(%ebp) + psrlq $32,%mm2 + movd %mm2,640(%edx) + + movd 36(%ebx),%mm4 + pfadd %mm4,%mm3 + movd %mm3,128(%ebp) + psrlq $32,%mm3 + movd %mm3,896(%edx) + movq 96(%ebx),%mm0 + movq 64(%ebx),%mm1 + + movq 112(%ebx),%mm2 + pfadd %mm2,%mm0 + movq %mm0,%mm3 + pfadd %mm1,%mm3 + movd %mm3,960(%ebp) + psrlq $32,%mm3 + movd %mm3,64(%edx) + movq 80(%ebx),%mm1 + pfadd %mm1,%mm0 + movd %mm0,832(%ebp) + psrlq $32,%mm0 + movd %mm0,192(%edx) + movq 104(%ebx),%mm3 + pfadd %mm3,%mm2 + movq %mm2,%mm4 + pfadd %mm1,%mm4 + movd %mm4,704(%ebp) + psrlq $32,%mm4 + movd %mm4,320(%edx) + movq 72(%ebx),%mm1 + pfadd %mm1,%mm2 + movd %mm2,576(%ebp) + psrlq $32,%mm2 + movd %mm2,448(%edx) + + movq 120(%ebx),%mm4 + pfadd %mm4,%mm3 + movq %mm3,%mm5 + pfadd %mm1,%mm5 + movd %mm5,448(%ebp) + psrlq $32,%mm5 + movd %mm5,576(%edx) + movq 88(%ebx),%mm1 + pfadd %mm1,%mm3 + movd %mm3,320(%ebp) + psrlq $32,%mm3 + movd %mm3,704(%edx) + + movd 100(%ebx),%mm5 + pfadd %mm5,%mm4 + movq %mm4,%mm6 + pfadd %mm1,%mm6 + movd %mm6,192(%ebp) + psrlq $32,%mm6 + movd %mm6,832(%edx) + movd 68(%ebx),%mm1 + pfadd %mm1,%mm4 + movd %mm4,64(%ebp) + psrlq $32,%mm4 + movd %mm4,960(%edx) + + /* femms */ + + popl %ebx + popl %esi + popl %edi + popl %ebp + addl $256,%esp + + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/dct64_3dnowext.S b/deps/mpg123/src/libmpg123/dct64_3dnowext.S new file mode 100644 index 0000000..1b4c583 --- /dev/null +++ b/deps/mpg123/src/libmpg123/dct64_3dnowext.S @@ -0,0 +1,714 @@ +/* + dct64_3dnowext: extended 3DNow optimized DCT64 + + copyright ?-2007 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + + Transformed back into standalone asm, with help of + gcc -S -DHAVE_CONFIG_H -I. -march=k6-3 -O3 -Wall -pedantic -fno-strict-aliasing -DREAL_IS_FLOAT -c -o dct64_3dnowext.{S,c} + + MPlayer comment follows. +*/ + +/* +* This code was taken from http://www.mpg123.org +* See ChangeLog of mpg123-0.59s-pre.1 for detail +* Applied to mplayer by Nick Kurshev +* Partial 3dnowex-DSP! optimization by Nick Kurshev +* +* TODO: optimize scalar 3dnow! code +* Warning: Phases 7 & 8 are not tested +*/ + +#include "mangle.h" + + .data + ALIGN4 + /* .type plus_1f, @object + .size plus_1f, 4 */ +plus_1f: + .long 1065353216 + ALIGN8 + /* .type x_plus_minus_3dnow, @object + .size x_plus_minus_3dnow, 8 */ +x_plus_minus_3dnow: + .long 0 + .long -2147483648 + + .text + ALIGN32 +.globl ASM_NAME(dct64_3dnowext) + /* .type ASM_NAME(dct64_3dnowext), @function */ +ASM_NAME(dct64_3dnowext): + pushl %ebp + movl %esp, %ebp + pushl %edi + pushl %esi + pushl %ebx + subl $256, %esp +/* APP */ + movl 16(%ebp),%eax + leal 128+-268(%ebp),%edx + movl 8(%ebp),%esi + movl 12(%ebp),%edi + movl ASM_VALUE(costab_mmxsse),%ebx + leal -268(%ebp),%ecx + movq (%eax), %mm0 + movq 8(%eax), %mm4 + movq %mm0, %mm3 + movq %mm4, %mm7 + pswapd 120(%eax), %mm1 + pswapd 112(%eax), %mm5 + pfadd %mm1, %mm0 + pfadd %mm5, %mm4 + movq %mm0, (%edx) + movq %mm4, 8(%edx) + pfsub %mm1, %mm3 + pfsub %mm5, %mm7 + pfmul (%ebx), %mm3 + pfmul 8(%ebx), %mm7 + pswapd %mm3, %mm3 + pswapd %mm7, %mm7 + movq %mm3, 120(%edx) + movq %mm7, 112(%edx) + movq 16(%eax), %mm0 + movq 24(%eax), %mm4 + movq %mm0, %mm3 + movq %mm4, %mm7 + pswapd 104(%eax), %mm1 + pswapd 96(%eax), %mm5 + pfadd %mm1, %mm0 + pfadd %mm5, %mm4 + movq %mm0, 16(%edx) + movq %mm4, 24(%edx) + pfsub %mm1, %mm3 + pfsub %mm5, %mm7 + pfmul 16(%ebx), %mm3 + pfmul 24(%ebx), %mm7 + pswapd %mm3, %mm3 + pswapd %mm7, %mm7 + movq %mm3, 104(%edx) + movq %mm7, 96(%edx) + movq 32(%eax), %mm0 + movq 40(%eax), %mm4 + movq %mm0, %mm3 + movq %mm4, %mm7 + pswapd 88(%eax), %mm1 + pswapd 80(%eax), %mm5 + pfadd %mm1, %mm0 + pfadd %mm5, %mm4 + movq %mm0, 32(%edx) + movq %mm4, 40(%edx) + pfsub %mm1, %mm3 + pfsub %mm5, %mm7 + pfmul 32(%ebx), %mm3 + pfmul 40(%ebx), %mm7 + pswapd %mm3, %mm3 + pswapd %mm7, %mm7 + movq %mm3, 88(%edx) + movq %mm7, 80(%edx) + movq 48(%eax), %mm0 + movq 56(%eax), %mm4 + movq %mm0, %mm3 + movq %mm4, %mm7 + pswapd 72(%eax), %mm1 + pswapd 64(%eax), %mm5 + pfadd %mm1, %mm0 + pfadd %mm5, %mm4 + movq %mm0, 48(%edx) + movq %mm4, 56(%edx) + pfsub %mm1, %mm3 + pfsub %mm5, %mm7 + pfmul 48(%ebx), %mm3 + pfmul 56(%ebx), %mm7 + pswapd %mm3, %mm3 + pswapd %mm7, %mm7 + movq %mm3, 72(%edx) + movq %mm7, 64(%edx) + movq (%edx), %mm0 + movq 8(%edx), %mm4 + movq %mm0, %mm3 + movq %mm4, %mm7 + pswapd 56(%edx), %mm1 + pswapd 48(%edx), %mm5 + pfadd %mm1, %mm0 + pfadd %mm5, %mm4 + movq %mm0, (%ecx) + movq %mm4, 8(%ecx) + pfsub %mm1, %mm3 + pfsub %mm5, %mm7 + pfmul 64(%ebx), %mm3 + pfmul 72(%ebx), %mm7 + pswapd %mm3, %mm3 + pswapd %mm7, %mm7 + movq %mm3, 56(%ecx) + movq %mm7, 48(%ecx) + movq 16(%edx), %mm0 + movq 24(%edx), %mm4 + movq %mm0, %mm3 + movq %mm4, %mm7 + pswapd 40(%edx), %mm1 + pswapd 32(%edx), %mm5 + pfadd %mm1, %mm0 + pfadd %mm5, %mm4 + movq %mm0, 16(%ecx) + movq %mm4, 24(%ecx) + pfsub %mm1, %mm3 + pfsub %mm5, %mm7 + pfmul 80(%ebx), %mm3 + pfmul 88(%ebx), %mm7 + pswapd %mm3, %mm3 + pswapd %mm7, %mm7 + movq %mm3, 40(%ecx) + movq %mm7, 32(%ecx) + movq 64(%edx), %mm0 + movq 72(%edx), %mm4 + movq %mm0, %mm3 + movq %mm4, %mm7 + pswapd 120(%edx), %mm1 + pswapd 112(%edx), %mm5 + pfadd %mm1, %mm0 + pfadd %mm5, %mm4 + movq %mm0, 64(%ecx) + movq %mm4, 72(%ecx) + pfsubr %mm1, %mm3 + pfsubr %mm5, %mm7 + pfmul 64(%ebx), %mm3 + pfmul 72(%ebx), %mm7 + pswapd %mm3, %mm3 + pswapd %mm7, %mm7 + movq %mm3, 120(%ecx) + movq %mm7, 112(%ecx) + movq 80(%edx), %mm0 + movq 88(%edx), %mm4 + movq %mm0, %mm3 + movq %mm4, %mm7 + pswapd 104(%edx), %mm1 + pswapd 96(%edx), %mm5 + pfadd %mm1, %mm0 + pfadd %mm5, %mm4 + movq %mm0, 80(%ecx) + movq %mm4, 88(%ecx) + pfsubr %mm1, %mm3 + pfsubr %mm5, %mm7 + pfmul 80(%ebx), %mm3 + pfmul 88(%ebx), %mm7 + pswapd %mm3, %mm3 + pswapd %mm7, %mm7 + movq %mm3, 104(%ecx) + movq %mm7, 96(%ecx) + movq 96(%ebx), %mm2 + movq 104(%ebx), %mm6 + movq (%ecx), %mm0 + movq 8(%ecx), %mm4 + movq %mm0, %mm3 + movq %mm4, %mm7 + pswapd 24(%ecx), %mm1 + pswapd 16(%ecx), %mm5 + pfadd %mm1, %mm0 + pfadd %mm5, %mm4 + movq %mm0, (%edx) + movq %mm4, 8(%edx) + pfsub %mm1, %mm3 + pfsub %mm5, %mm7 + pfmul %mm2, %mm3 + pfmul %mm6, %mm7 + pswapd %mm3, %mm3 + pswapd %mm7, %mm7 + movq %mm3, 24(%edx) + movq %mm7, 16(%edx) + movq 32(%ecx), %mm0 + movq 40(%ecx), %mm4 + movq %mm0, %mm3 + movq %mm4, %mm7 + pswapd 56(%ecx), %mm1 + pswapd 48(%ecx), %mm5 + pfadd %mm1, %mm0 + pfadd %mm5, %mm4 + movq %mm0, 32(%edx) + movq %mm4, 40(%edx) + pfsubr %mm1, %mm3 + pfsubr %mm5, %mm7 + pfmul %mm2, %mm3 + pfmul %mm6, %mm7 + pswapd %mm3, %mm3 + pswapd %mm7, %mm7 + movq %mm3, 56(%edx) + movq %mm7, 48(%edx) + movq 64(%ecx), %mm0 + movq 72(%ecx), %mm4 + movq %mm0, %mm3 + movq %mm4, %mm7 + pswapd 88(%ecx), %mm1 + pswapd 80(%ecx), %mm5 + pfadd %mm1, %mm0 + pfadd %mm5, %mm4 + movq %mm0, 64(%edx) + movq %mm4, 72(%edx) + pfsub %mm1, %mm3 + pfsub %mm5, %mm7 + pfmul %mm2, %mm3 + pfmul %mm6, %mm7 + pswapd %mm3, %mm3 + pswapd %mm7, %mm7 + movq %mm3, 88(%edx) + movq %mm7, 80(%edx) + movq 96(%ecx), %mm0 + movq 104(%ecx), %mm4 + movq %mm0, %mm3 + movq %mm4, %mm7 + pswapd 120(%ecx), %mm1 + pswapd 112(%ecx), %mm5 + pfadd %mm1, %mm0 + pfadd %mm5, %mm4 + movq %mm0, 96(%edx) + movq %mm4, 104(%edx) + pfsubr %mm1, %mm3 + pfsubr %mm5, %mm7 + pfmul %mm2, %mm3 + pfmul %mm6, %mm7 + pswapd %mm3, %mm3 + pswapd %mm7, %mm7 + movq %mm3, 120(%edx) + movq %mm7, 112(%edx) + movq 112(%ebx), %mm2 + movq (%edx), %mm0 + movq 16(%edx), %mm4 + movq %mm0, %mm3 + movq %mm4, %mm7 + pswapd 8(%edx), %mm1 + pswapd 24(%edx), %mm5 + pfadd %mm1, %mm0 + pfadd %mm5, %mm4 + movq %mm0, (%ecx) + movq %mm4, 16(%ecx) + pfsub %mm1, %mm3 + pfsubr %mm5, %mm7 + pfmul %mm2, %mm3 + pfmul %mm2, %mm7 + pswapd %mm3, %mm3 + pswapd %mm7, %mm7 + movq %mm3, 8(%ecx) + movq %mm7, 24(%ecx) + movq 32(%edx), %mm0 + movq 48(%edx), %mm4 + movq %mm0, %mm3 + movq %mm4, %mm7 + pswapd 40(%edx), %mm1 + pswapd 56(%edx), %mm5 + pfadd %mm1, %mm0 + pfadd %mm5, %mm4 + movq %mm0, 32(%ecx) + movq %mm4, 48(%ecx) + pfsub %mm1, %mm3 + pfsubr %mm5, %mm7 + pfmul %mm2, %mm3 + pfmul %mm2, %mm7 + pswapd %mm3, %mm3 + pswapd %mm7, %mm7 + movq %mm3, 40(%ecx) + movq %mm7, 56(%ecx) + movq 64(%edx), %mm0 + movq 80(%edx), %mm4 + movq %mm0, %mm3 + movq %mm4, %mm7 + pswapd 72(%edx), %mm1 + pswapd 88(%edx), %mm5 + pfadd %mm1, %mm0 + pfadd %mm5, %mm4 + movq %mm0, 64(%ecx) + movq %mm4, 80(%ecx) + pfsub %mm1, %mm3 + pfsubr %mm5, %mm7 + pfmul %mm2, %mm3 + pfmul %mm2, %mm7 + pswapd %mm3, %mm3 + pswapd %mm7, %mm7 + movq %mm3, 72(%ecx) + movq %mm7, 88(%ecx) + movq 96(%edx), %mm0 + movq 112(%edx), %mm4 + movq %mm0, %mm3 + movq %mm4, %mm7 + pswapd 104(%edx), %mm1 + pswapd 120(%edx), %mm5 + pfadd %mm1, %mm0 + pfadd %mm5, %mm4 + movq %mm0, 96(%ecx) + movq %mm4, 112(%ecx) + pfsub %mm1, %mm3 + pfsubr %mm5, %mm7 + pfmul %mm2, %mm3 + pfmul %mm2, %mm7 + pswapd %mm3, %mm3 + pswapd %mm7, %mm7 + movq %mm3, 104(%ecx) + movq %mm7, 120(%ecx) + movd plus_1f, %mm6 + punpckldq 120(%ebx), %mm6 + movq x_plus_minus_3dnow, %mm7 + movq 32(%ecx), %mm0 + movq 64(%ecx), %mm2 + movq %mm0, %mm1 + movq %mm2, %mm3 + pxor %mm7, %mm1 + pxor %mm7, %mm3 + pfacc %mm1, %mm0 + pfacc %mm3, %mm2 + pfmul %mm6, %mm0 + pfmul %mm6, %mm2 + movq %mm0, 32(%edx) + movq %mm2, 64(%edx) + movd 44(%ecx), %mm0 + movd 40(%ecx), %mm2 + movd 120(%ebx), %mm3 + punpckldq 76(%ecx), %mm0 + punpckldq 72(%ecx), %mm2 + punpckldq %mm3, %mm3 + movq %mm0, %mm4 + movq %mm2, %mm5 + pfsub %mm2, %mm0 + pfmul %mm3, %mm0 + movq %mm0, %mm1 + pfadd %mm5, %mm0 + pfadd %mm4, %mm0 + movq %mm0, %mm2 + punpckldq %mm1, %mm0 + punpckhdq %mm1, %mm2 + movq %mm0, 40(%edx) + movq %mm2, 72(%edx) + movd 48(%ecx), %mm3 + movd 60(%ecx), %mm2 + pfsub 52(%ecx), %mm3 + pfsub 56(%ecx), %mm2 + pfmul 120(%ebx), %mm3 + pfmul 120(%ebx), %mm2 + movq %mm2, %mm1 + pfadd 56(%ecx), %mm1 + pfadd 60(%ecx), %mm1 + movq %mm1, %mm0 + pfadd 48(%ecx), %mm0 + pfadd 52(%ecx), %mm0 + pfadd %mm3, %mm1 + punpckldq %mm2, %mm1 + pfadd %mm3, %mm2 + punpckldq %mm2, %mm0 + movq %mm1, 56(%edx) + movq %mm0, 48(%edx) + movd 92(%ecx), %mm1 + pfsub 88(%ecx), %mm1 + pfmul 120(%ebx), %mm1 + movd %mm1, 92(%edx) + pfadd 92(%ecx), %mm1 + pfadd 88(%ecx), %mm1 + movq %mm1, %mm0 + pfadd 80(%ecx), %mm0 + pfadd 84(%ecx), %mm0 + movd %mm0, 80(%edx) + movd 80(%ecx), %mm0 + pfsub 84(%ecx), %mm0 + pfmul 120(%ebx), %mm0 + pfadd %mm0, %mm1 + pfadd 92(%edx), %mm0 + punpckldq %mm1, %mm0 + movq %mm0, 84(%edx) + movq 96(%ecx), %mm0 + movq %mm0, %mm1 + pxor %mm7, %mm1 + pfacc %mm1, %mm0 + pfmul %mm6, %mm0 + movq %mm0, 96(%edx) + movd 108(%ecx), %mm0 + pfsub 104(%ecx), %mm0 + pfmul 120(%ebx), %mm0 + movd %mm0, 108(%edx) + pfadd 104(%ecx), %mm0 + pfadd 108(%ecx), %mm0 + movd %mm0, 104(%edx) + movd 124(%ecx), %mm1 + pfsub 120(%ecx), %mm1 + pfmul 120(%ebx), %mm1 + movd %mm1, 124(%edx) + pfadd 120(%ecx), %mm1 + pfadd 124(%ecx), %mm1 + movq %mm1, %mm0 + pfadd 112(%ecx), %mm0 + pfadd 116(%ecx), %mm0 + movd %mm0, 112(%edx) + movd 112(%ecx), %mm0 + pfsub 116(%ecx), %mm0 + pfmul 120(%ebx), %mm0 + pfadd %mm0,%mm1 + pfadd 124(%edx), %mm0 + punpckldq %mm1, %mm0 + movq %mm0, 116(%edx) + jnz .L01 + movd (%ecx), %mm0 + pfadd 4(%ecx), %mm0 + movd %mm0, 1024(%esi) + movd (%ecx), %mm0 + pfsub 4(%ecx), %mm0 + pfmul 120(%ebx), %mm0 + movd %mm0, (%esi) + movd %mm0, (%edi) + movd 12(%ecx), %mm0 + pfsub 8(%ecx), %mm0 + pfmul 120(%ebx), %mm0 + movd %mm0, 512(%edi) + pfadd 12(%ecx), %mm0 + pfadd 8(%ecx), %mm0 + movd %mm0, 512(%esi) + movd 16(%ecx), %mm0 + pfsub 20(%ecx), %mm0 + pfmul 120(%ebx), %mm0 + movq %mm0, %mm3 + movd 28(%ecx), %mm0 + pfsub 24(%ecx), %mm0 + pfmul 120(%ebx), %mm0 + movd %mm0, 768(%edi) + movq %mm0, %mm2 + pfadd 24(%ecx), %mm0 + pfadd 28(%ecx), %mm0 + movq %mm0, %mm1 + pfadd 16(%ecx), %mm0 + pfadd 20(%ecx), %mm0 + movd %mm0, 768(%esi) + pfadd %mm3, %mm1 + movd %mm1, 256(%esi) + pfadd %mm3, %mm2 + movd %mm2, 256(%edi) + movq 32(%edx), %mm0 + movq 48(%edx), %mm1 + pfadd 48(%edx), %mm0 + pfadd 40(%edx), %mm1 + movd %mm0, 896(%esi) + movd %mm1, 640(%esi) + psrlq $32, %mm0 + psrlq $32, %mm1 + movd %mm0, 128(%edi) + movd %mm1, 384(%edi) + movd 40(%edx), %mm0 + pfadd 56(%edx), %mm0 + movd %mm0, 384(%esi) + movd 56(%edx), %mm0 + pfadd 36(%edx), %mm0 + movd %mm0, 128(%esi) + movd 60(%edx), %mm0 + movd %mm0, 896(%edi) + pfadd 44(%edx), %mm0 + movd %mm0, 640(%edi) + movq 96(%edx), %mm0 + movq 112(%edx), %mm2 + movq 104(%edx), %mm4 + pfadd 112(%edx), %mm0 + pfadd 104(%edx), %mm2 + pfadd 120(%edx), %mm4 + movq %mm0, %mm1 + movq %mm2, %mm3 + movq %mm4, %mm5 + pfadd 64(%edx), %mm0 + pfadd 80(%edx), %mm2 + pfadd 72(%edx), %mm4 + movd %mm0, 960(%esi) + movd %mm2, 704(%esi) + movd %mm4, 448(%esi) + psrlq $32, %mm0 + psrlq $32, %mm2 + psrlq $32, %mm4 + movd %mm0, 64(%edi) + movd %mm2, 320(%edi) + movd %mm4, 576(%edi) + pfadd 80(%edx), %mm1 + pfadd 72(%edx), %mm3 + pfadd 88(%edx), %mm5 + movd %mm1, 832(%esi) + movd %mm3, 576(%esi) + movd %mm5, 320(%esi) + psrlq $32, %mm1 + psrlq $32, %mm3 + psrlq $32, %mm5 + movd %mm1, 192(%edi) + movd %mm3, 448(%edi) + movd %mm5, 704(%edi) + movd 120(%edx), %mm0 + pfadd 100(%edx), %mm0 + movq %mm0, %mm1 + pfadd 88(%edx), %mm0 + movd %mm0, 192(%esi) + pfadd 68(%edx), %mm1 + movd %mm1, 64(%esi) + movd 124(%edx), %mm0 + movd %mm0, 960(%edi) + pfadd 92(%edx), %mm0 + movd %mm0, 832(%edi) + jmp .L_bye +.L01: + movq (%ecx), %mm0 + movq %mm0, %mm1 + pxor %mm7, %mm1 + pfacc %mm1, %mm0 + pfmul %mm6, %mm0 + pf2iw %mm0, %mm0 + movd %mm0, %eax + movw %ax, 512(%esi) + psrlq $32, %mm0 + movd %mm0, %eax + movw %ax, (%esi) + movd 12(%ecx), %mm0 + pfsub 8(%ecx), %mm0 + pfmul 120(%ebx), %mm0 + pf2iw %mm0, %mm7 + movd %mm7, %eax + movw %ax, 256(%edi) + pfadd 12(%ecx), %mm0 + pfadd 8(%ecx), %mm0 + pf2iw %mm0, %mm0 + movd %mm0, %eax + movw %ax, 256(%esi) + movd 16(%ecx), %mm3 + pfsub 20(%ecx), %mm3 + pfmul 120(%ebx), %mm3 + movq %mm3, %mm2 + movd 28(%ecx), %mm2 + pfsub 24(%ecx), %mm2 + pfmul 120(%ebx), %mm2 + movq %mm2, %mm1 + pf2iw %mm2, %mm7 + movd %mm7, %eax + movw %ax, 384(%edi) + pfadd 24(%ecx), %mm1 + pfadd 28(%ecx), %mm1 + movq %mm1, %mm0 + pfadd 16(%ecx), %mm0 + pfadd 20(%ecx), %mm0 + pf2iw %mm0, %mm0 + movd %mm0, %eax + movw %ax, 384(%esi) + pfadd %mm3, %mm1 + pf2iw %mm1, %mm1 + movd %mm1, %eax + movw %ax, 128(%esi) + pfadd %mm3, %mm2 + pf2iw %mm2, %mm2 + movd %mm2, %eax + movw %ax, 128(%edi) + movq 32(%edx), %mm0 + movq 48(%edx), %mm1 + pfadd 48(%edx), %mm0 + pfadd 40(%edx), %mm1 + pf2iw %mm0, %mm0 + pf2iw %mm1, %mm1 + movd %mm0, %eax + movd %mm1, %ecx + movw %ax, 448(%esi) + movw %cx, 320(%esi) + psrlq $32, %mm0 + psrlq $32, %mm1 + movd %mm0, %eax + movd %mm1, %ecx + movw %ax, 64(%edi) + movw %cx, 192(%edi) + movd 40(%edx), %mm3 + movd 56(%edx), %mm4 + movd 60(%edx), %mm0 + movd 44(%edx), %mm2 + movd 120(%edx), %mm5 + punpckldq %mm4, %mm3 + punpckldq 124(%edx), %mm0 + pfadd 100(%edx), %mm5 + punpckldq 36(%edx), %mm4 + punpckldq 92(%edx), %mm2 + movq %mm5, %mm6 + pfadd %mm4, %mm3 + pf2iw %mm0, %mm1 + pf2iw %mm3, %mm3 + pfadd 88(%edx), %mm5 + movd %mm1, %eax + movd %mm3, %ecx + movw %ax, 448(%edi) + movw %cx, 192(%esi) + pf2iw %mm5, %mm5 + psrlq $32, %mm1 + psrlq $32, %mm3 + movd %mm5, %ebx + movd %mm1, %eax + movd %mm3, %ecx + movw %bx, 96(%esi) + movw %ax, 480(%edi) + movw %cx, 64(%esi) + pfadd %mm2, %mm0 + pf2iw %mm0, %mm0 + movd %mm0, %eax + pfadd 68(%edx), %mm6 + movw %ax, 320(%edi) + psrlq $32, %mm0 + pf2iw %mm6, %mm6 + movd %mm0, %eax + movd %mm6, %ebx + movw %ax, 416(%edi) + movw %bx, 32(%esi) + movq 96(%edx), %mm0 + movq 112(%edx), %mm2 + movq 104(%edx), %mm4 + pfadd %mm2, %mm0 + pfadd %mm4, %mm2 + pfadd 120(%edx), %mm4 + movq %mm0, %mm1 + movq %mm2, %mm3 + movq %mm4, %mm5 + pfadd 64(%edx), %mm0 + pfadd 80(%edx), %mm2 + pfadd 72(%edx), %mm4 + pf2iw %mm0, %mm0 + pf2iw %mm2, %mm2 + pf2iw %mm4, %mm4 + movd %mm0, %eax + movd %mm2, %ecx + movd %mm4, %ebx + movw %ax, 480(%esi) + movw %cx, 352(%esi) + movw %bx, 224(%esi) + psrlq $32, %mm0 + psrlq $32, %mm2 + psrlq $32, %mm4 + movd %mm0, %eax + movd %mm2, %ecx + movd %mm4, %ebx + movw %ax, 32(%edi) + movw %cx, 160(%edi) + movw %bx, 288(%edi) + pfadd 80(%edx), %mm1 + pfadd 72(%edx), %mm3 + pfadd 88(%edx), %mm5 + pf2iw %mm1, %mm1 + pf2iw %mm3, %mm3 + pf2iw %mm5, %mm5 + movd %mm1, %eax + movd %mm3, %ecx + movd %mm5, %ebx + movw %ax, 416(%esi) + movw %cx, 288(%esi) + movw %bx, 160(%esi) + psrlq $32, %mm1 + psrlq $32, %mm3 + psrlq $32, %mm5 + movd %mm1, %eax + movd %mm3, %ecx + movd %mm5, %ebx + movw %ax, 96(%edi) + movw %cx, 224(%edi) + movw %bx, 352(%edi) + movsw +.L_bye: + femms + +/* NO_APP */ + addl $256, %esp + popl %ebx + popl %esi + popl %edi + leave + ret + /* .size ASM_NAME(dct64_3dnowext), .-ASM_NAME(dct64_3dnowext) */ + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/dct64_altivec.c b/deps/mpg123/src/libmpg123/dct64_altivec.c new file mode 100644 index 0000000..3d6c7e1 --- /dev/null +++ b/deps/mpg123/src/libmpg123/dct64_altivec.c @@ -0,0 +1,315 @@ +/* + dct64_altivec.c: Discrete Cosine Tansform (DCT) for Altivec + + copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Michael Hipp + altivec optimization by tmkk +*/ + +/* + * Discrete Cosine Tansform (DCT) for subband synthesis + * + * -funroll-loops (for gcc) will remove the loops for better performance + * using loops in the source-code enhances readabillity + * + * + * TODO: write an optimized version for the down-sampling modes + * (in these modes the bands 16-31 (2:1) or 8-31 (4:1) are zero + */ + +#include "mpg123lib_intern.h" + +#ifndef __APPLE__ +#include +#endif + +void dct64_altivec(real *out0,real *out1,real *samples) +{ + ALIGNED(16) real bufs[32]; + + { + register real *b1,*costab; + + vector unsigned char vinvert,vperm1,vperm2,vperm3,vperm4; + vector float v1,v2,v3,v4,v5,v6,v7,v8; + vector float vbs1,vbs2,vbs3,vbs4,vbs5,vbs6,vbs7,vbs8; + vector float vbs9,vbs10,vbs11,vbs12,vbs13,vbs14,vbs15,vbs16; + vector float vzero; + b1 = samples; + costab = pnts[0]; + + vzero = vec_xor(vzero,vzero); +#ifdef __APPLE__ + vinvert = (vector unsigned char)(12,13,14,15,8,9,10,11,4,5,6,7,0,1,2,3); +#else + vinvert = (vector unsigned char){12,13,14,15,8,9,10,11,4,5,6,7,0,1,2,3}; +#endif + vperm1 = vec_lvsl(0,b1); + vperm2 = vec_perm(vperm1,vperm1,vinvert); + + v1 = vec_ld(0,b1); + v2 = vec_ld(16,b1); + v3 = vec_ld(112,b1); + v4 = vec_ld(127,b1); + v5 = vec_perm(v1,v2,vperm1); /* b1[0,1,2,3] */ + v6 = vec_perm(v3,v4,vperm2); /* b1[31,30,29,28] */ + + vbs1 = vec_add(v5,v6); + vbs8 = vec_sub(v5,v6); + + v1 = vec_ld(32,b1); + v4 = vec_ld(96,b1); + v5 = vec_perm(v2,v1,vperm1); /* b1[4,5,6,7] */ + v6 = vec_perm(v4,v3,vperm2); /* b1[27,26,25,24] */ + + vbs2 = vec_add(v5,v6); + vbs7 = vec_sub(v5,v6); + + v2 = vec_ld(48,b1); + v3 = vec_ld(80,b1); + v5 = vec_perm(v1,v2,vperm1); /* b1[8,9,10,11] */ + v6 = vec_perm(v3,v4,vperm2); /* b1[23,22,21,20] */ + + vbs3 = vec_add(v5,v6); + vbs6 = vec_sub(v5,v6); + + v1 = vec_ld(64,b1); + v5 = vec_perm(v2,v1,vperm1); /* b1[12,13,14,15] */ + v6 = vec_perm(v1,v3,vperm2); /* b1[19,18,17,16] */ + + vbs4 = vec_add(v5,v6); + vbs5 = vec_sub(v5,v6); + + v1 = vec_ld(0,costab); + vbs8 = vec_madd(vbs8,v1,vzero); + v2 = vec_ld(16,costab); + vbs7 = vec_madd(vbs7,v2,vzero); + v3 = vec_ld(32,costab); + vbs6 = vec_madd(vbs6,v3,vzero); + v4 = vec_ld(48,costab); + vbs5 = vec_madd(vbs5,v4,vzero); + vbs6 = vec_perm(vbs6,vbs6,vinvert); + vbs5 = vec_perm(vbs5,vbs5,vinvert); + + + costab = pnts[1]; + + v1 = vec_perm(vbs4,vbs4,vinvert); + vbs9 = vec_add(vbs1,v1); + v3 = vec_sub(vbs1,v1); + v5 = vec_ld(0,costab); + v2 = vec_perm(vbs3,vbs3,vinvert); + vbs10 = vec_add(vbs2,v2); + v4 = vec_sub(vbs2,v2); + v6 = vec_ld(16,costab); + vbs12 = vec_madd(v3,v5,vzero); + vbs11 = vec_madd(v4,v6,vzero); + + v7 = vec_sub(vbs7,vbs6); + v8 = vec_sub(vbs8,vbs5); + vbs13 = vec_add(vbs5,vbs8); + vbs14 = vec_add(vbs6,vbs7); + vbs15 = vec_madd(v7,v6,vzero); + vbs16 = vec_madd(v8,v5,vzero); + + + costab = pnts[2]; + + v1 = vec_perm(vbs10,vbs10,vinvert); + v5 = vec_perm(vbs14,vbs14,vinvert); + vbs1 = vec_add(v1,vbs9); + vbs5 = vec_add(v5,vbs13); + v2 = vec_sub(vbs9,v1); + v6 = vec_sub(vbs13,v5); + v3 = vec_ld(0,costab); + vbs11 = vec_perm(vbs11,vbs11,vinvert); + vbs15 = vec_perm(vbs15,vbs15,vinvert); + vbs3 = vec_add(vbs11,vbs12); + vbs7 = vec_add(vbs15,vbs16); + v4 = vec_sub(vbs12,vbs11); + v7 = vec_sub(vbs16,vbs15); + vbs2 = vec_madd(v2,v3,vzero); + vbs4 = vec_madd(v4,v3,vzero); + vbs6 = vec_madd(v6,v3,vzero); + vbs8 = vec_madd(v7,v3,vzero); + + vbs2 = vec_perm(vbs2,vbs2,vinvert); + vbs4 = vec_perm(vbs4,vbs4,vinvert); + vbs6 = vec_perm(vbs6,vbs6,vinvert); + vbs8 = vec_perm(vbs8,vbs8,vinvert); + + + costab = pnts[3]; + +#ifdef __APPLE__ + vperm1 = (vector unsigned char)(0,1,2,3,4,5,6,7,16,17,18,19,20,21,22,23); + vperm2 = (vector unsigned char)(12,13,14,15,8,9,10,11,28,29,30,31,24,25,26,27); + vperm3 = (vector unsigned char)(0,1,2,3,4,5,6,7,20,21,22,23,16,17,18,19); +#else + vperm1 = (vector unsigned char){0,1,2,3,4,5,6,7,16,17,18,19,20,21,22,23}; + vperm2 = (vector unsigned char){12,13,14,15,8,9,10,11,28,29,30,31,24,25,26,27}; + vperm3 = (vector unsigned char){0,1,2,3,4,5,6,7,20,21,22,23,16,17,18,19}; +#endif + vperm4 = vec_add(vperm3,vec_splat_u8(8)); + + v1 = vec_ld(0,costab); + v2 = vec_splat(v1,0); + v3 = vec_splat(v1,1); + v1 = vec_mergeh(v2,v3); + + v2 = vec_perm(vbs1,vbs3,vperm1); + v3 = vec_perm(vbs2,vbs4,vperm1); + v4 = vec_perm(vbs1,vbs3,vperm2); + v5 = vec_perm(vbs2,vbs4,vperm2); + v6 = vec_sub(v2,v4); + v7 = vec_sub(v3,v5); + v2 = vec_add(v2,v4); + v3 = vec_add(v3,v5); + v4 = vec_madd(v6,v1,vzero); + v5 = vec_nmsub(v7,v1,vzero); + vbs9 = vec_perm(v2,v4,vperm3); + vbs11 = vec_perm(v2,v4,vperm4); + vbs10 = vec_perm(v3,v5,vperm3); + vbs12 = vec_perm(v3,v5,vperm4); + + v2 = vec_perm(vbs5,vbs7,vperm1); + v3 = vec_perm(vbs6,vbs8,vperm1); + v4 = vec_perm(vbs5,vbs7,vperm2); + v5 = vec_perm(vbs6,vbs8,vperm2); + v6 = vec_sub(v2,v4); + v7 = vec_sub(v3,v5); + v2 = vec_add(v2,v4); + v3 = vec_add(v3,v5); + v4 = vec_madd(v6,v1,vzero); + v5 = vec_nmsub(v7,v1,vzero); + vbs13 = vec_perm(v2,v4,vperm3); + vbs15 = vec_perm(v2,v4,vperm4); + vbs14 = vec_perm(v3,v5,vperm3); + vbs16 = vec_perm(v3,v5,vperm4); + + + costab = pnts[4]; + + v1 = vec_lde(0,costab); +#ifdef __APPLE__ + v2 = (vector float)(1.0f,-1.0f,1.0f,-1.0f); +#else + v2 = (vector float){1.0f,-1.0f,1.0f,-1.0f}; +#endif + v3 = vec_splat(v1,0); + v1 = vec_madd(v2,v3,vzero); + + v2 = vec_mergeh(vbs9,vbs10); + v3 = vec_mergel(vbs9,vbs10); + v4 = vec_mergeh(vbs11,vbs12); + v5 = vec_mergel(vbs11,vbs12); + v6 = vec_mergeh(v2,v3); + v7 = vec_mergel(v2,v3); + v2 = vec_mergeh(v4,v5); + v3 = vec_mergel(v4,v5); + v4 = vec_sub(v6,v7); + v5 = vec_sub(v2,v3); + v6 = vec_add(v6,v7); + v7 = vec_add(v2,v3); + v2 = vec_madd(v4,v1,vzero); + v3 = vec_madd(v5,v1,vzero); + vbs1 = vec_mergeh(v6,v2); + vbs2 = vec_mergel(v6,v2); + vbs3 = vec_mergeh(v7,v3); + vbs4 = vec_mergel(v7,v3); + + v2 = vec_mergeh(vbs13,vbs14); + v3 = vec_mergel(vbs13,vbs14); + v4 = vec_mergeh(vbs15,vbs16); + v5 = vec_mergel(vbs15,vbs16); + v6 = vec_mergeh(v2,v3); + v7 = vec_mergel(v2,v3); + v2 = vec_mergeh(v4,v5); + v3 = vec_mergel(v4,v5); + v4 = vec_sub(v6,v7); + v5 = vec_sub(v2,v3); + v6 = vec_add(v6,v7); + v7 = vec_add(v2,v3); + v2 = vec_madd(v4,v1,vzero); + v3 = vec_madd(v5,v1,vzero); + vbs5 = vec_mergeh(v6,v2); + vbs6 = vec_mergel(v6,v2); + vbs7 = vec_mergeh(v7,v3); + vbs8 = vec_mergel(v7,v3); + + vec_st(vbs1,0,bufs); + vec_st(vbs2,16,bufs); + vec_st(vbs3,32,bufs); + vec_st(vbs4,48,bufs); + vec_st(vbs5,64,bufs); + vec_st(vbs6,80,bufs); + vec_st(vbs7,96,bufs); + vec_st(vbs8,112,bufs); + } + + { + register real *b1; + register int i; + + for(b1=bufs,i=8;i;i--,b1+=4) + b1[2] += b1[3]; + + for(b1=bufs,i=4;i;i--,b1+=8) + { + b1[4] += b1[6]; + b1[6] += b1[5]; + b1[5] += b1[7]; + } + + for(b1=bufs,i=2;i;i--,b1+=16) + { + b1[8] += b1[12]; + b1[12] += b1[10]; + b1[10] += b1[14]; + b1[14] += b1[9]; + b1[9] += b1[13]; + b1[13] += b1[11]; + b1[11] += b1[15]; + } + } + + + out0[0x10*16] = bufs[0]; + out0[0x10*15] = bufs[16+0] + bufs[16+8]; + out0[0x10*14] = bufs[8]; + out0[0x10*13] = bufs[16+8] + bufs[16+4]; + out0[0x10*12] = bufs[4]; + out0[0x10*11] = bufs[16+4] + bufs[16+12]; + out0[0x10*10] = bufs[12]; + out0[0x10* 9] = bufs[16+12] + bufs[16+2]; + out0[0x10* 8] = bufs[2]; + out0[0x10* 7] = bufs[16+2] + bufs[16+10]; + out0[0x10* 6] = bufs[10]; + out0[0x10* 5] = bufs[16+10] + bufs[16+6]; + out0[0x10* 4] = bufs[6]; + out0[0x10* 3] = bufs[16+6] + bufs[16+14]; + out0[0x10* 2] = bufs[14]; + out0[0x10* 1] = bufs[16+14] + bufs[16+1]; + out0[0x10* 0] = bufs[1]; + + out1[0x10* 0] = bufs[1]; + out1[0x10* 1] = bufs[16+1] + bufs[16+9]; + out1[0x10* 2] = bufs[9]; + out1[0x10* 3] = bufs[16+9] + bufs[16+5]; + out1[0x10* 4] = bufs[5]; + out1[0x10* 5] = bufs[16+5] + bufs[16+13]; + out1[0x10* 6] = bufs[13]; + out1[0x10* 7] = bufs[16+13] + bufs[16+3]; + out1[0x10* 8] = bufs[3]; + out1[0x10* 9] = bufs[16+3] + bufs[16+11]; + out1[0x10*10] = bufs[11]; + out1[0x10*11] = bufs[16+11] + bufs[16+7]; + out1[0x10*12] = bufs[7]; + out1[0x10*13] = bufs[16+7] + bufs[16+15]; + out1[0x10*14] = bufs[15]; + out1[0x10*15] = bufs[16+15]; + +} + + diff --git a/deps/mpg123/src/libmpg123/dct64_i386.c b/deps/mpg123/src/libmpg123/dct64_i386.c new file mode 100644 index 0000000..abc05b9 --- /dev/null +++ b/deps/mpg123/src/libmpg123/dct64_i386.c @@ -0,0 +1,336 @@ +/* + dct64_i386.c: DCT64, a C variant for i386 + + copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Michael Hipp +*/ + +/* + * Discrete Cosine Tansform (DCT) for subband synthesis + * optimized for machines with no auto-increment. + * The performance is highly compiler dependend. Maybe + * the dct64.c version for 'normal' processor may be faster + * even for Intel processors. + */ + +#include "mpg123lib_intern.h" + +static void dct64_1(real *out0,real *out1,real *b1,real *b2,real *samples) +{ + { + register real *costab = pnts[0]; + + b1[0x00] = samples[0x00] + samples[0x1F]; + b1[0x01] = samples[0x01] + samples[0x1E]; + b1[0x1F] = REAL_MUL(samples[0x00] - samples[0x1F], costab[0x0]); + b1[0x1E] = REAL_MUL(samples[0x01] - samples[0x1E], costab[0x1]); + + b1[0x02] = samples[0x02] + samples[0x1D]; + b1[0x03] = samples[0x03] + samples[0x1C]; + b1[0x1D] = REAL_MUL(samples[0x02] - samples[0x1D], costab[0x2]); + b1[0x1C] = REAL_MUL(samples[0x03] - samples[0x1C], costab[0x3]); + + b1[0x04] = samples[0x04] + samples[0x1B]; + b1[0x05] = samples[0x05] + samples[0x1A]; + b1[0x1B] = REAL_MUL(samples[0x04] - samples[0x1B], costab[0x4]); + b1[0x1A] = REAL_MUL(samples[0x05] - samples[0x1A], costab[0x5]); + + b1[0x06] = samples[0x06] + samples[0x19]; + b1[0x07] = samples[0x07] + samples[0x18]; + b1[0x19] = REAL_MUL(samples[0x06] - samples[0x19], costab[0x6]); + b1[0x18] = REAL_MUL(samples[0x07] - samples[0x18], costab[0x7]); + + b1[0x08] = samples[0x08] + samples[0x17]; + b1[0x09] = samples[0x09] + samples[0x16]; + b1[0x17] = REAL_MUL(samples[0x08] - samples[0x17], costab[0x8]); + b1[0x16] = REAL_MUL(samples[0x09] - samples[0x16], costab[0x9]); + + b1[0x0A] = samples[0x0A] + samples[0x15]; + b1[0x0B] = samples[0x0B] + samples[0x14]; + b1[0x15] = REAL_MUL(samples[0x0A] - samples[0x15], costab[0xA]); + b1[0x14] = REAL_MUL(samples[0x0B] - samples[0x14], costab[0xB]); + + b1[0x0C] = samples[0x0C] + samples[0x13]; + b1[0x0D] = samples[0x0D] + samples[0x12]; + b1[0x13] = REAL_MUL(samples[0x0C] - samples[0x13], costab[0xC]); + b1[0x12] = REAL_MUL(samples[0x0D] - samples[0x12], costab[0xD]); + + b1[0x0E] = samples[0x0E] + samples[0x11]; + b1[0x0F] = samples[0x0F] + samples[0x10]; + b1[0x11] = REAL_MUL(samples[0x0E] - samples[0x11], costab[0xE]); + b1[0x10] = REAL_MUL(samples[0x0F] - samples[0x10], costab[0xF]); + + } + + + { + register real *costab = pnts[1]; + + b2[0x00] = b1[0x00] + b1[0x0F]; + b2[0x01] = b1[0x01] + b1[0x0E]; + b2[0x0F] = REAL_MUL(b1[0x00] - b1[0x0F], costab[0]); + b2[0x0E] = REAL_MUL(b1[0x01] - b1[0x0E], costab[1]); + + b2[0x02] = b1[0x02] + b1[0x0D]; + b2[0x03] = b1[0x03] + b1[0x0C]; + b2[0x0D] = REAL_MUL(b1[0x02] - b1[0x0D], costab[2]); + b2[0x0C] = REAL_MUL(b1[0x03] - b1[0x0C], costab[3]); + + b2[0x04] = b1[0x04] + b1[0x0B]; + b2[0x05] = b1[0x05] + b1[0x0A]; + b2[0x0B] = REAL_MUL(b1[0x04] - b1[0x0B], costab[4]); + b2[0x0A] = REAL_MUL(b1[0x05] - b1[0x0A], costab[5]); + + b2[0x06] = b1[0x06] + b1[0x09]; + b2[0x07] = b1[0x07] + b1[0x08]; + b2[0x09] = REAL_MUL(b1[0x06] - b1[0x09], costab[6]); + b2[0x08] = REAL_MUL(b1[0x07] - b1[0x08], costab[7]); + + /* */ + + b2[0x10] = b1[0x10] + b1[0x1F]; + b2[0x11] = b1[0x11] + b1[0x1E]; + b2[0x1F] = REAL_MUL(b1[0x1F] - b1[0x10], costab[0]); + b2[0x1E] = REAL_MUL(b1[0x1E] - b1[0x11], costab[1]); + + b2[0x12] = b1[0x12] + b1[0x1D]; + b2[0x13] = b1[0x13] + b1[0x1C]; + b2[0x1D] = REAL_MUL(b1[0x1D] - b1[0x12], costab[2]); + b2[0x1C] = REAL_MUL(b1[0x1C] - b1[0x13], costab[3]); + + b2[0x14] = b1[0x14] + b1[0x1B]; + b2[0x15] = b1[0x15] + b1[0x1A]; + b2[0x1B] = REAL_MUL(b1[0x1B] - b1[0x14], costab[4]); + b2[0x1A] = REAL_MUL(b1[0x1A] - b1[0x15], costab[5]); + + b2[0x16] = b1[0x16] + b1[0x19]; + b2[0x17] = b1[0x17] + b1[0x18]; + b2[0x19] = REAL_MUL(b1[0x19] - b1[0x16], costab[6]); + b2[0x18] = REAL_MUL(b1[0x18] - b1[0x17], costab[7]); + } + + { + register real *costab = pnts[2]; + + b1[0x00] = b2[0x00] + b2[0x07]; + b1[0x07] = REAL_MUL(b2[0x00] - b2[0x07], costab[0]); + b1[0x01] = b2[0x01] + b2[0x06]; + b1[0x06] = REAL_MUL(b2[0x01] - b2[0x06], costab[1]); + b1[0x02] = b2[0x02] + b2[0x05]; + b1[0x05] = REAL_MUL(b2[0x02] - b2[0x05], costab[2]); + b1[0x03] = b2[0x03] + b2[0x04]; + b1[0x04] = REAL_MUL(b2[0x03] - b2[0x04], costab[3]); + + b1[0x08] = b2[0x08] + b2[0x0F]; + b1[0x0F] = REAL_MUL(b2[0x0F] - b2[0x08], costab[0]); + b1[0x09] = b2[0x09] + b2[0x0E]; + b1[0x0E] = REAL_MUL(b2[0x0E] - b2[0x09], costab[1]); + b1[0x0A] = b2[0x0A] + b2[0x0D]; + b1[0x0D] = REAL_MUL(b2[0x0D] - b2[0x0A], costab[2]); + b1[0x0B] = b2[0x0B] + b2[0x0C]; + b1[0x0C] = REAL_MUL(b2[0x0C] - b2[0x0B], costab[3]); + + b1[0x10] = b2[0x10] + b2[0x17]; + b1[0x17] = REAL_MUL(b2[0x10] - b2[0x17], costab[0]); + b1[0x11] = b2[0x11] + b2[0x16]; + b1[0x16] = REAL_MUL(b2[0x11] - b2[0x16], costab[1]); + b1[0x12] = b2[0x12] + b2[0x15]; + b1[0x15] = REAL_MUL(b2[0x12] - b2[0x15], costab[2]); + b1[0x13] = b2[0x13] + b2[0x14]; + b1[0x14] = REAL_MUL(b2[0x13] - b2[0x14], costab[3]); + + b1[0x18] = b2[0x18] + b2[0x1F]; + b1[0x1F] = REAL_MUL(b2[0x1F] - b2[0x18], costab[0]); + b1[0x19] = b2[0x19] + b2[0x1E]; + b1[0x1E] = REAL_MUL(b2[0x1E] - b2[0x19], costab[1]); + b1[0x1A] = b2[0x1A] + b2[0x1D]; + b1[0x1D] = REAL_MUL(b2[0x1D] - b2[0x1A], costab[2]); + b1[0x1B] = b2[0x1B] + b2[0x1C]; + b1[0x1C] = REAL_MUL(b2[0x1C] - b2[0x1B], costab[3]); + } + + { + register real const cos0 = pnts[3][0]; + register real const cos1 = pnts[3][1]; + + b2[0x00] = b1[0x00] + b1[0x03]; + b2[0x03] = REAL_MUL(b1[0x00] - b1[0x03], cos0); + b2[0x01] = b1[0x01] + b1[0x02]; + b2[0x02] = REAL_MUL(b1[0x01] - b1[0x02], cos1); + + b2[0x04] = b1[0x04] + b1[0x07]; + b2[0x07] = REAL_MUL(b1[0x07] - b1[0x04], cos0); + b2[0x05] = b1[0x05] + b1[0x06]; + b2[0x06] = REAL_MUL(b1[0x06] - b1[0x05], cos1); + + b2[0x08] = b1[0x08] + b1[0x0B]; + b2[0x0B] = REAL_MUL(b1[0x08] - b1[0x0B], cos0); + b2[0x09] = b1[0x09] + b1[0x0A]; + b2[0x0A] = REAL_MUL(b1[0x09] - b1[0x0A], cos1); + + b2[0x0C] = b1[0x0C] + b1[0x0F]; + b2[0x0F] = REAL_MUL(b1[0x0F] - b1[0x0C], cos0); + b2[0x0D] = b1[0x0D] + b1[0x0E]; + b2[0x0E] = REAL_MUL(b1[0x0E] - b1[0x0D], cos1); + + b2[0x10] = b1[0x10] + b1[0x13]; + b2[0x13] = REAL_MUL(b1[0x10] - b1[0x13], cos0); + b2[0x11] = b1[0x11] + b1[0x12]; + b2[0x12] = REAL_MUL(b1[0x11] - b1[0x12], cos1); + + b2[0x14] = b1[0x14] + b1[0x17]; + b2[0x17] = REAL_MUL(b1[0x17] - b1[0x14], cos0); + b2[0x15] = b1[0x15] + b1[0x16]; + b2[0x16] = REAL_MUL(b1[0x16] - b1[0x15], cos1); + + b2[0x18] = b1[0x18] + b1[0x1B]; + b2[0x1B] = REAL_MUL(b1[0x18] - b1[0x1B], cos0); + b2[0x19] = b1[0x19] + b1[0x1A]; + b2[0x1A] = REAL_MUL(b1[0x19] - b1[0x1A], cos1); + + b2[0x1C] = b1[0x1C] + b1[0x1F]; + b2[0x1F] = REAL_MUL(b1[0x1F] - b1[0x1C], cos0); + b2[0x1D] = b1[0x1D] + b1[0x1E]; + b2[0x1E] = REAL_MUL(b1[0x1E] - b1[0x1D], cos1); + } + + { + register real const cos0 = pnts[4][0]; + + b1[0x00] = b2[0x00] + b2[0x01]; + b1[0x01] = REAL_MUL(b2[0x00] - b2[0x01], cos0); + b1[0x02] = b2[0x02] + b2[0x03]; + b1[0x03] = REAL_MUL(b2[0x03] - b2[0x02], cos0); + b1[0x02] += b1[0x03]; + + b1[0x04] = b2[0x04] + b2[0x05]; + b1[0x05] = REAL_MUL(b2[0x04] - b2[0x05], cos0); + b1[0x06] = b2[0x06] + b2[0x07]; + b1[0x07] = REAL_MUL(b2[0x07] - b2[0x06], cos0); + b1[0x06] += b1[0x07]; + b1[0x04] += b1[0x06]; + b1[0x06] += b1[0x05]; + b1[0x05] += b1[0x07]; + + b1[0x08] = b2[0x08] + b2[0x09]; + b1[0x09] = REAL_MUL(b2[0x08] - b2[0x09], cos0); + b1[0x0A] = b2[0x0A] + b2[0x0B]; + b1[0x0B] = REAL_MUL(b2[0x0B] - b2[0x0A], cos0); + b1[0x0A] += b1[0x0B]; + + b1[0x0C] = b2[0x0C] + b2[0x0D]; + b1[0x0D] = REAL_MUL(b2[0x0C] - b2[0x0D], cos0); + b1[0x0E] = b2[0x0E] + b2[0x0F]; + b1[0x0F] = REAL_MUL(b2[0x0F] - b2[0x0E], cos0); + b1[0x0E] += b1[0x0F]; + b1[0x0C] += b1[0x0E]; + b1[0x0E] += b1[0x0D]; + b1[0x0D] += b1[0x0F]; + + b1[0x10] = b2[0x10] + b2[0x11]; + b1[0x11] = REAL_MUL(b2[0x10] - b2[0x11], cos0); + b1[0x12] = b2[0x12] + b2[0x13]; + b1[0x13] = REAL_MUL(b2[0x13] - b2[0x12], cos0); + b1[0x12] += b1[0x13]; + + b1[0x14] = b2[0x14] + b2[0x15]; + b1[0x15] = REAL_MUL(b2[0x14] - b2[0x15], cos0); + b1[0x16] = b2[0x16] + b2[0x17]; + b1[0x17] = REAL_MUL(b2[0x17] - b2[0x16], cos0); + b1[0x16] += b1[0x17]; + b1[0x14] += b1[0x16]; + b1[0x16] += b1[0x15]; + b1[0x15] += b1[0x17]; + + b1[0x18] = b2[0x18] + b2[0x19]; + b1[0x19] = REAL_MUL(b2[0x18] - b2[0x19], cos0); + b1[0x1A] = b2[0x1A] + b2[0x1B]; + b1[0x1B] = REAL_MUL(b2[0x1B] - b2[0x1A], cos0); + b1[0x1A] += b1[0x1B]; + + b1[0x1C] = b2[0x1C] + b2[0x1D]; + b1[0x1D] = REAL_MUL(b2[0x1C] - b2[0x1D], cos0); + b1[0x1E] = b2[0x1E] + b2[0x1F]; + b1[0x1F] = REAL_MUL(b2[0x1F] - b2[0x1E], cos0); + b1[0x1E] += b1[0x1F]; + b1[0x1C] += b1[0x1E]; + b1[0x1E] += b1[0x1D]; + b1[0x1D] += b1[0x1F]; + } + + out0[0x10*16] = REAL_SCALE_DCT64(b1[0x00]); + out0[0x10*12] = REAL_SCALE_DCT64(b1[0x04]); + out0[0x10* 8] = REAL_SCALE_DCT64(b1[0x02]); + out0[0x10* 4] = REAL_SCALE_DCT64(b1[0x06]); + out0[0x10* 0] = REAL_SCALE_DCT64(b1[0x01]); + out1[0x10* 0] = REAL_SCALE_DCT64(b1[0x01]); + out1[0x10* 4] = REAL_SCALE_DCT64(b1[0x05]); + out1[0x10* 8] = REAL_SCALE_DCT64(b1[0x03]); + out1[0x10*12] = REAL_SCALE_DCT64(b1[0x07]); + +#if 1 + out0[0x10*14] = REAL_SCALE_DCT64(b1[0x08] + b1[0x0C]); + out0[0x10*10] = REAL_SCALE_DCT64(b1[0x0C] + b1[0x0a]); + out0[0x10* 6] = REAL_SCALE_DCT64(b1[0x0A] + b1[0x0E]); + out0[0x10* 2] = REAL_SCALE_DCT64(b1[0x0E] + b1[0x09]); + out1[0x10* 2] = REAL_SCALE_DCT64(b1[0x09] + b1[0x0D]); + out1[0x10* 6] = REAL_SCALE_DCT64(b1[0x0D] + b1[0x0B]); + out1[0x10*10] = REAL_SCALE_DCT64(b1[0x0B] + b1[0x0F]); + out1[0x10*14] = REAL_SCALE_DCT64(b1[0x0F]); +#else + b1[0x08] += b1[0x0C]; + out0[0x10*14] = REAL_SCALE_DCT64(b1[0x08]); + b1[0x0C] += b1[0x0a]; + out0[0x10*10] = REAL_SCALE_DCT64(b1[0x0C]); + b1[0x0A] += b1[0x0E]; + out0[0x10* 6] = REAL_SCALE_DCT64(b1[0x0A]); + b1[0x0E] += b1[0x09]; + out0[0x10* 2] = REAL_SCALE_DCT64(b1[0x0E]); + b1[0x09] += b1[0x0D]; + out1[0x10* 2] = REAL_SCALE_DCT64(b1[0x09]); + b1[0x0D] += b1[0x0B]; + out1[0x10* 6] = REAL_SCALE_DCT64(b1[0x0D]); + b1[0x0B] += b1[0x0F]; + out1[0x10*10] = REAL_SCALE_DCT64(b1[0x0B]); + out1[0x10*14] = REAL_SCALE_DCT64(b1[0x0F]); +#endif + + { + real tmp; + tmp = b1[0x18] + b1[0x1C]; + out0[0x10*15] = REAL_SCALE_DCT64(tmp + b1[0x10]); + out0[0x10*13] = REAL_SCALE_DCT64(tmp + b1[0x14]); + tmp = b1[0x1C] + b1[0x1A]; + out0[0x10*11] = REAL_SCALE_DCT64(tmp + b1[0x14]); + out0[0x10* 9] = REAL_SCALE_DCT64(tmp + b1[0x12]); + tmp = b1[0x1A] + b1[0x1E]; + out0[0x10* 7] = REAL_SCALE_DCT64(tmp + b1[0x12]); + out0[0x10* 5] = REAL_SCALE_DCT64(tmp + b1[0x16]); + tmp = b1[0x1E] + b1[0x19]; + out0[0x10* 3] = REAL_SCALE_DCT64(tmp + b1[0x16]); + out0[0x10* 1] = REAL_SCALE_DCT64(tmp + b1[0x11]); + tmp = b1[0x19] + b1[0x1D]; + out1[0x10* 1] = REAL_SCALE_DCT64(tmp + b1[0x11]); + out1[0x10* 3] = REAL_SCALE_DCT64(tmp + b1[0x15]); + tmp = b1[0x1D] + b1[0x1B]; + out1[0x10* 5] = REAL_SCALE_DCT64(tmp + b1[0x15]); + out1[0x10* 7] = REAL_SCALE_DCT64(tmp + b1[0x13]); + tmp = b1[0x1B] + b1[0x1F]; + out1[0x10* 9] = REAL_SCALE_DCT64(tmp + b1[0x13]); + out1[0x10*11] = REAL_SCALE_DCT64(tmp + b1[0x17]); + out1[0x10*13] = REAL_SCALE_DCT64(b1[0x17] + b1[0x1F]); + out1[0x10*15] = REAL_SCALE_DCT64(b1[0x1F]); + } +} + +/* + * the call via dct64 is a trick to force GCC to use + * (new) registers for the b1,b2 pointer to the bufs[xx] field + */ +void dct64_i386(real *a,real *b,real *c) +{ + real bufs[0x40]; + dct64_1(a,b,bufs,bufs+0x20,c); +} + diff --git a/deps/mpg123/src/libmpg123/dct64_i486.c b/deps/mpg123/src/libmpg123/dct64_i486.c new file mode 100644 index 0000000..b81d060 --- /dev/null +++ b/deps/mpg123/src/libmpg123/dct64_i486.c @@ -0,0 +1,342 @@ +/* + dct64_i486.c: DCT64, a plain C variant for i486 + + copyright 1998-2006 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Fabrice Bellard +*/ + +/* Discrete Cosine Tansform (DCT) for subband synthesis. + * + * This code is optimized for 80486. It should be compiled with gcc + * 2.7.2 or higher. + * + * Note: This code does not give the necessary accuracy. Moreover, no + * overflow test are done. + * + * (c) 1998 Fabrice Bellard. + */ + +#include "mpg123lib_intern.h" + +#define COS_0_0 16403 +#define COS_0_1 16563 +#define COS_0_2 16890 +#define COS_0_3 17401 +#define COS_0_4 18124 +#define COS_0_5 19101 +#define COS_0_6 20398 +#define COS_0_7 22112 +#define COS_0_8 24396 +#define COS_0_9 27503 +#define COS_0_10 31869 +#define COS_0_11 38320 +#define COS_0_12 48633 +#define COS_0_13 67429 +#define COS_0_14 111660 +#define COS_0_15 333906 +#define COS_1_0 16463 +#define COS_1_1 17121 +#define COS_1_2 18577 +#define COS_1_3 21195 +#define COS_1_4 25826 +#define COS_1_5 34756 +#define COS_1_6 56441 +#define COS_1_7 167154 +#define COS_2_0 16704 +#define COS_2_1 19704 +#define COS_2_2 29490 +#define COS_2_3 83981 +#define COS_3_0 17733 +#define COS_3_1 42813 +#define COS_4_0 23170 + +#define SETOUT(out,n,expr) out[FIR_BUFFER_SIZE*(n)]=(expr) +#define MULL(a,b) (((long long)(a)*(long long)(b)) >> 15) +#define MUL(a,b) \ +(\ + ((!(b & 0x3F)) ? (((a)*(b >> 6)) >> 9) :\ + ((!(b & 0x1F)) ? (((a)*(b >> 5)) >> 10) :\ + ((!(b & 0x0F)) ? (((a)*(b >> 4)) >> 11) :\ + ((!(b & 0x07)) ? (((a)*(b >> 3)) >> 12) :\ + ((!(b & 0x03)) ? (((a)*(b >> 2)) >> 13) :\ + ((!(b & 0x01)) ? (((a)*(b >> 1)) >> 14) :\ + (((a)*(b )) >> 15)))))))) + + +void dct64_1_486(int *out0,int *out1,int *b1,int *b2) +{ + b1[0x00] = b2[0x00] + b2[0x1F]; + b1[0x1F] = MUL((b2[0x00] - b2[0x1F]),COS_0_0); + + b1[0x01] = b2[0x01] + b2[0x1E]; + b1[0x1E] = MUL((b2[0x01] - b2[0x1E]),COS_0_1); + + b1[0x02] = b2[0x02] + b2[0x1D]; + b1[0x1D] = MUL((b2[0x02] - b2[0x1D]),COS_0_2); + + b1[0x03] = b2[0x03] + b2[0x1C]; + b1[0x1C] = MUL((b2[0x03] - b2[0x1C]),COS_0_3); + + b1[0x04] = b2[0x04] + b2[0x1B]; + b1[0x1B] = MUL((b2[0x04] - b2[0x1B]),COS_0_4); + + b1[0x05] = b2[0x05] + b2[0x1A]; + b1[0x1A] = MUL((b2[0x05] - b2[0x1A]),COS_0_5); + + b1[0x06] = b2[0x06] + b2[0x19]; + b1[0x19] = MUL((b2[0x06] - b2[0x19]),COS_0_6); + + b1[0x07] = b2[0x07] + b2[0x18]; + b1[0x18] = MUL((b2[0x07] - b2[0x18]),COS_0_7); + + b1[0x08] = b2[0x08] + b2[0x17]; + b1[0x17] = MUL((b2[0x08] - b2[0x17]),COS_0_8); + + b1[0x09] = b2[0x09] + b2[0x16]; + b1[0x16] = MUL((b2[0x09] - b2[0x16]),COS_0_9); + + b1[0x0A] = b2[0x0A] + b2[0x15]; + b1[0x15] = MUL((b2[0x0A] - b2[0x15]),COS_0_10); + + b1[0x0B] = b2[0x0B] + b2[0x14]; + b1[0x14] = MUL((b2[0x0B] - b2[0x14]),COS_0_11); + + b1[0x0C] = b2[0x0C] + b2[0x13]; + b1[0x13] = MUL((b2[0x0C] - b2[0x13]),COS_0_12); + + b1[0x0D] = b2[0x0D] + b2[0x12]; + b1[0x12] = MULL((b2[0x0D] - b2[0x12]),COS_0_13); + + b1[0x0E] = b2[0x0E] + b2[0x11]; + b1[0x11] = MULL((b2[0x0E] - b2[0x11]),COS_0_14); + + b1[0x0F] = b2[0x0F] + b2[0x10]; + b1[0x10] = MULL((b2[0x0F] - b2[0x10]),COS_0_15); + + + b2[0x00] = b1[0x00] + b1[0x0F]; + b2[0x0F] = MUL((b1[0x00] - b1[0x0F]),COS_1_0); + b2[0x01] = b1[0x01] + b1[0x0E]; + b2[0x0E] = MUL((b1[0x01] - b1[0x0E]),COS_1_1); + b2[0x02] = b1[0x02] + b1[0x0D]; + b2[0x0D] = MUL((b1[0x02] - b1[0x0D]),COS_1_2); + b2[0x03] = b1[0x03] + b1[0x0C]; + b2[0x0C] = MUL((b1[0x03] - b1[0x0C]),COS_1_3); + b2[0x04] = b1[0x04] + b1[0x0B]; + b2[0x0B] = MUL((b1[0x04] - b1[0x0B]),COS_1_4); + b2[0x05] = b1[0x05] + b1[0x0A]; + b2[0x0A] = MUL((b1[0x05] - b1[0x0A]),COS_1_5); + b2[0x06] = b1[0x06] + b1[0x09]; + b2[0x09] = MUL((b1[0x06] - b1[0x09]),COS_1_6); + b2[0x07] = b1[0x07] + b1[0x08]; + b2[0x08] = MULL((b1[0x07] - b1[0x08]),COS_1_7); + + b2[0x10] = b1[0x10] + b1[0x1F]; + b2[0x1F] = MUL((b1[0x1F] - b1[0x10]),COS_1_0); + b2[0x11] = b1[0x11] + b1[0x1E]; + b2[0x1E] = MUL((b1[0x1E] - b1[0x11]),COS_1_1); + b2[0x12] = b1[0x12] + b1[0x1D]; + b2[0x1D] = MUL((b1[0x1D] - b1[0x12]),COS_1_2); + b2[0x13] = b1[0x13] + b1[0x1C]; + b2[0x1C] = MUL((b1[0x1C] - b1[0x13]),COS_1_3); + b2[0x14] = b1[0x14] + b1[0x1B]; + b2[0x1B] = MUL((b1[0x1B] - b1[0x14]),COS_1_4); + b2[0x15] = b1[0x15] + b1[0x1A]; + b2[0x1A] = MUL((b1[0x1A] - b1[0x15]),COS_1_5); + b2[0x16] = b1[0x16] + b1[0x19]; + b2[0x19] = MUL((b1[0x19] - b1[0x16]),COS_1_6); + b2[0x17] = b1[0x17] + b1[0x18]; + b2[0x18] = MULL((b1[0x18] - b1[0x17]),COS_1_7); + + + b1[0x00] = b2[0x00] + b2[0x07]; + b1[0x07] = MUL((b2[0x00] - b2[0x07]),COS_2_0); + b1[0x01] = b2[0x01] + b2[0x06]; + b1[0x06] = MUL((b2[0x01] - b2[0x06]),COS_2_1); + b1[0x02] = b2[0x02] + b2[0x05]; + b1[0x05] = MUL((b2[0x02] - b2[0x05]),COS_2_2); + b1[0x03] = b2[0x03] + b2[0x04]; + b1[0x04] = MULL((b2[0x03] - b2[0x04]),COS_2_3); + + b1[0x08] = b2[0x08] + b2[0x0F]; + b1[0x0F] = MUL((b2[0x0F] - b2[0x08]),COS_2_0); + b1[0x09] = b2[0x09] + b2[0x0E]; + b1[0x0E] = MUL((b2[0x0E] - b2[0x09]),COS_2_1); + b1[0x0A] = b2[0x0A] + b2[0x0D]; + b1[0x0D] = MUL((b2[0x0D] - b2[0x0A]),COS_2_2); + b1[0x0B] = b2[0x0B] + b2[0x0C]; + b1[0x0C] = MULL((b2[0x0C] - b2[0x0B]),COS_2_3); + + b1[0x10] = b2[0x10] + b2[0x17]; + b1[0x17] = MUL((b2[0x10] - b2[0x17]),COS_2_0); + b1[0x11] = b2[0x11] + b2[0x16]; + b1[0x16] = MUL((b2[0x11] - b2[0x16]),COS_2_1); + b1[0x12] = b2[0x12] + b2[0x15]; + b1[0x15] = MUL((b2[0x12] - b2[0x15]),COS_2_2); + b1[0x13] = b2[0x13] + b2[0x14]; + b1[0x14] = MULL((b2[0x13] - b2[0x14]),COS_2_3); + + b1[0x18] = b2[0x18] + b2[0x1F]; + b1[0x1F] = MUL((b2[0x1F] - b2[0x18]),COS_2_0); + b1[0x19] = b2[0x19] + b2[0x1E]; + b1[0x1E] = MUL((b2[0x1E] - b2[0x19]),COS_2_1); + b1[0x1A] = b2[0x1A] + b2[0x1D]; + b1[0x1D] = MUL((b2[0x1D] - b2[0x1A]),COS_2_2); + b1[0x1B] = b2[0x1B] + b2[0x1C]; + b1[0x1C] = MULL((b2[0x1C] - b2[0x1B]),COS_2_3); + + + b2[0x00] = b1[0x00] + b1[0x03]; + b2[0x03] = MUL((b1[0x00] - b1[0x03]),COS_3_0); + b2[0x01] = b1[0x01] + b1[0x02]; + b2[0x02] = MUL((b1[0x01] - b1[0x02]),COS_3_1); + + b2[0x04] = b1[0x04] + b1[0x07]; + b2[0x07] = MUL((b1[0x07] - b1[0x04]),COS_3_0); + b2[0x05] = b1[0x05] + b1[0x06]; + b2[0x06] = MUL((b1[0x06] - b1[0x05]),COS_3_1); + + b2[0x08] = b1[0x08] + b1[0x0B]; + b2[0x0B] = MUL((b1[0x08] - b1[0x0B]),COS_3_0); + b2[0x09] = b1[0x09] + b1[0x0A]; + b2[0x0A] = MUL((b1[0x09] - b1[0x0A]),COS_3_1); + + b2[0x0C] = b1[0x0C] + b1[0x0F]; + b2[0x0F] = MUL((b1[0x0F] - b1[0x0C]),COS_3_0); + b2[0x0D] = b1[0x0D] + b1[0x0E]; + b2[0x0E] = MUL((b1[0x0E] - b1[0x0D]),COS_3_1); + + b2[0x10] = b1[0x10] + b1[0x13]; + b2[0x13] = MUL((b1[0x10] - b1[0x13]),COS_3_0); + b2[0x11] = b1[0x11] + b1[0x12]; + b2[0x12] = MUL((b1[0x11] - b1[0x12]),COS_3_1); + + b2[0x14] = b1[0x14] + b1[0x17]; + b2[0x17] = MUL((b1[0x17] - b1[0x14]),COS_3_0); + b2[0x15] = b1[0x15] + b1[0x16]; + b2[0x16] = MUL((b1[0x16] - b1[0x15]),COS_3_1); + + b2[0x18] = b1[0x18] + b1[0x1B]; + b2[0x1B] = MUL((b1[0x18] - b1[0x1B]),COS_3_0); + b2[0x19] = b1[0x19] + b1[0x1A]; + b2[0x1A] = MUL((b1[0x19] - b1[0x1A]),COS_3_1); + + b2[0x1C] = b1[0x1C] + b1[0x1F]; + b2[0x1F] = MUL((b1[0x1F] - b1[0x1C]),COS_3_0); + b2[0x1D] = b1[0x1D] + b1[0x1E]; + b2[0x1E] = MUL((b1[0x1E] - b1[0x1D]),COS_3_1); + + { + int i; + for(i=0;i<32;i+=4) { + b1[i+0x00] = b2[i+0x00] + b2[i+0x01]; + b1[i+0x01] = MUL((b2[i+0x00] - b2[i+0x01]),COS_4_0); + b1[i+0x02] = b2[i+0x02] + b2[i+0x03]; + b1[i+0x03] = MUL((b2[i+0x03] - b2[i+0x02]),COS_4_0); + } + } + + b1[0x02] += b1[0x03]; + b1[0x06] += b1[0x07]; + b1[0x04] += b1[0x06]; + b1[0x06] += b1[0x05]; + b1[0x05] += b1[0x07]; + + b1[0x0A] += b1[0x0B]; + b1[0x0E] += b1[0x0F]; + b1[0x0C] += b1[0x0E]; + b1[0x0E] += b1[0x0D]; + b1[0x0D] += b1[0x0F]; + + b1[0x12] += b1[0x13]; + b1[0x16] += b1[0x17]; + b1[0x14] += b1[0x16]; + b1[0x16] += b1[0x15]; + b1[0x15] += b1[0x17]; + + b1[0x1A] += b1[0x1B]; + b1[0x1E] += b1[0x1F]; + b1[0x1C] += b1[0x1E]; + b1[0x1E] += b1[0x1D]; + b1[0x1D] += b1[0x1F]; + + SETOUT(out0,16,b1[0x00]); + SETOUT(out0,12,b1[0x04]); + SETOUT(out0, 8,b1[0x02]); + SETOUT(out0, 4,b1[0x06]); + SETOUT(out0, 0,b1[0x01]); + SETOUT(out1, 0,b1[0x01]); + SETOUT(out1, 4,b1[0x05]); + SETOUT(out1, 8,b1[0x03]); + SETOUT(out1,12,b1[0x07]); + + b1[0x08] += b1[0x0C]; + SETOUT(out0,14,b1[0x08]); + b1[0x0C] += b1[0x0a]; + SETOUT(out0,10,b1[0x0C]); + b1[0x0A] += b1[0x0E]; + SETOUT(out0, 6,b1[0x0A]); + b1[0x0E] += b1[0x09]; + SETOUT(out0, 2,b1[0x0E]); + b1[0x09] += b1[0x0D]; + SETOUT(out1, 2,b1[0x09]); + b1[0x0D] += b1[0x0B]; + SETOUT(out1, 6,b1[0x0D]); + b1[0x0B] += b1[0x0F]; + SETOUT(out1,10,b1[0x0B]); + SETOUT(out1,14,b1[0x0F]); + + b1[0x18] += b1[0x1C]; + SETOUT(out0,15,b1[0x10] + b1[0x18]); + SETOUT(out0,13,b1[0x18] + b1[0x14]); + b1[0x1C] += b1[0x1a]; + SETOUT(out0,11,b1[0x14] + b1[0x1C]); + SETOUT(out0, 9,b1[0x1C] + b1[0x12]); + b1[0x1A] += b1[0x1E]; + SETOUT(out0, 7,b1[0x12] + b1[0x1A]); + SETOUT(out0, 5,b1[0x1A] + b1[0x16]); + b1[0x1E] += b1[0x19]; + SETOUT(out0, 3,b1[0x16] + b1[0x1E]); + SETOUT(out0, 1,b1[0x1E] + b1[0x11]); + b1[0x19] += b1[0x1D]; + SETOUT(out1, 1,b1[0x11] + b1[0x19]); + SETOUT(out1, 3,b1[0x19] + b1[0x15]); + b1[0x1D] += b1[0x1B]; + SETOUT(out1, 5,b1[0x15] + b1[0x1D]); + SETOUT(out1, 7,b1[0x1D] + b1[0x13]); + b1[0x1B] += b1[0x1F]; + SETOUT(out1, 9,b1[0x13] + b1[0x1B]); + SETOUT(out1,11,b1[0x1B] + b1[0x17]); + SETOUT(out1,13,b1[0x17] + b1[0x1F]); + SETOUT(out1,15,b1[0x1F]); +} + + +/* + * the call via dct64 is a trick to force GCC to use + * (new) registers for the b1,b2 pointer to the bufs[xx] field + */ +void dct64_i486(int *a,int *b,real *samples) +{ + int bufs[64]; + int i; + +#ifdef REAL_IS_FIXED +#define TOINT(a) ((a) * 32768 / (int)REAL_FACTOR) + + for(i=0;i<32;i++) { + bufs[i]=TOINT(samples[i]); + } +#else + int *p = bufs; + register double const scale = ((65536.0 * 32) + 1) * 65536.0; + + for(i=0;i<32;i++) { + *((double *) (p++)) = scale + *samples++; /* beware on bufs overrun: 8B store from x87 */ + } +#endif + + dct64_1_486(a,b,bufs+32,bufs); +} + diff --git a/deps/mpg123/src/libmpg123/dct64_mmx.S b/deps/mpg123/src/libmpg123/dct64_mmx.S new file mode 100644 index 0000000..b700732 --- /dev/null +++ b/deps/mpg123/src/libmpg123/dct64_mmx.S @@ -0,0 +1,811 @@ +/* + dct64_mmx.s: MMX optimized DCT64 + + copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by the mysterious higway (apparently) +*/ + +#include "mangle.h" + +.text + + ALIGN32 +.globl ASM_NAME(dct64_mmx) +ASM_NAME(dct64_mmx): + + xorl %ecx,%ecx +.globl ASM_NAME(dct64_MMX) +ASM_NAME(dct64_MMX): + pushl %ebx + pushl %esi + pushl %edi + subl $256,%esp + movl 280(%esp),%eax + flds (%eax) + leal 128(%esp),%edx + fadds 124(%eax) + movl 272(%esp),%esi + fstps (%edx) + movl 276(%esp),%edi + flds 4(%eax) + movl ASM_VALUE(costab_mmxsse),%ebx + fadds 120(%eax) + orl %ecx,%ecx + fstps 4(%edx) + flds (%eax) + movl %esp,%ecx + fsubs 124(%eax) + fmuls (%ebx) + fstps 124(%edx) + flds 4(%eax) + fsubs 120(%eax) + fmuls 4(%ebx) + fstps 120(%edx) + flds 8(%eax) + fadds 116(%eax) + fstps 8(%edx) + flds 12(%eax) + fadds 112(%eax) + fstps 12(%edx) + flds 8(%eax) + fsubs 116(%eax) + fmuls 8(%ebx) + fstps 116(%edx) + flds 12(%eax) + fsubs 112(%eax) + fmuls 12(%ebx) + fstps 112(%edx) + flds 16(%eax) + fadds 108(%eax) + fstps 16(%edx) + flds 20(%eax) + fadds 104(%eax) + fstps 20(%edx) + flds 16(%eax) + fsubs 108(%eax) + fmuls 16(%ebx) + fstps 108(%edx) + flds 20(%eax) + fsubs 104(%eax) + fmuls 20(%ebx) + fstps 104(%edx) + flds 24(%eax) + fadds 100(%eax) + fstps 24(%edx) + flds 28(%eax) + fadds 96(%eax) + fstps 28(%edx) + flds 24(%eax) + fsubs 100(%eax) + fmuls 24(%ebx) + fstps 100(%edx) + flds 28(%eax) + fsubs 96(%eax) + fmuls 28(%ebx) + fstps 96(%edx) + flds 32(%eax) + fadds 92(%eax) + fstps 32(%edx) + flds 36(%eax) + fadds 88(%eax) + fstps 36(%edx) + flds 32(%eax) + fsubs 92(%eax) + fmuls 32(%ebx) + fstps 92(%edx) + flds 36(%eax) + fsubs 88(%eax) + fmuls 36(%ebx) + fstps 88(%edx) + flds 40(%eax) + fadds 84(%eax) + fstps 40(%edx) + flds 44(%eax) + fadds 80(%eax) + fstps 44(%edx) + flds 40(%eax) + fsubs 84(%eax) + fmuls 40(%ebx) + fstps 84(%edx) + flds 44(%eax) + fsubs 80(%eax) + fmuls 44(%ebx) + fstps 80(%edx) + flds 48(%eax) + fadds 76(%eax) + fstps 48(%edx) + flds 52(%eax) + fadds 72(%eax) + fstps 52(%edx) + flds 48(%eax) + fsubs 76(%eax) + fmuls 48(%ebx) + fstps 76(%edx) + flds 52(%eax) + fsubs 72(%eax) + fmuls 52(%ebx) + fstps 72(%edx) + flds 56(%eax) + fadds 68(%eax) + fstps 56(%edx) + flds 60(%eax) + fadds 64(%eax) + fstps 60(%edx) + flds 56(%eax) + fsubs 68(%eax) + fmuls 56(%ebx) + fstps 68(%edx) + flds 60(%eax) + fsubs 64(%eax) + fmuls 60(%ebx) + fstps 64(%edx) + + flds (%edx) + fadds 60(%edx) + fstps (%ecx) + flds 4(%edx) + fadds 56(%edx) + fstps 4(%ecx) + flds (%edx) + fsubs 60(%edx) + fmuls 64(%ebx) + fstps 60(%ecx) + flds 4(%edx) + fsubs 56(%edx) + fmuls 68(%ebx) + fstps 56(%ecx) + flds 8(%edx) + fadds 52(%edx) + fstps 8(%ecx) + flds 12(%edx) + fadds 48(%edx) + fstps 12(%ecx) + flds 8(%edx) + fsubs 52(%edx) + fmuls 72(%ebx) + fstps 52(%ecx) + flds 12(%edx) + fsubs 48(%edx) + fmuls 76(%ebx) + fstps 48(%ecx) + flds 16(%edx) + fadds 44(%edx) + fstps 16(%ecx) + flds 20(%edx) + fadds 40(%edx) + fstps 20(%ecx) + flds 16(%edx) + fsubs 44(%edx) + fmuls 80(%ebx) + fstps 44(%ecx) + flds 20(%edx) + fsubs 40(%edx) + fmuls 84(%ebx) + fstps 40(%ecx) + flds 24(%edx) + fadds 36(%edx) + fstps 24(%ecx) + flds 28(%edx) + fadds 32(%edx) + fstps 28(%ecx) + flds 24(%edx) + fsubs 36(%edx) + fmuls 88(%ebx) + fstps 36(%ecx) + flds 28(%edx) + fsubs 32(%edx) + fmuls 92(%ebx) + fstps 32(%ecx) + + flds 64(%edx) + fadds 124(%edx) + fstps 64(%ecx) + flds 68(%edx) + fadds 120(%edx) + fstps 68(%ecx) + flds 124(%edx) + fsubs 64(%edx) + fmuls 64(%ebx) + fstps 124(%ecx) + flds 120(%edx) + fsubs 68(%edx) + fmuls 68(%ebx) + fstps 120(%ecx) + flds 72(%edx) + fadds 116(%edx) + fstps 72(%ecx) + flds 76(%edx) + fadds 112(%edx) + fstps 76(%ecx) + flds 116(%edx) + fsubs 72(%edx) + fmuls 72(%ebx) + fstps 116(%ecx) + flds 112(%edx) + fsubs 76(%edx) + fmuls 76(%ebx) + fstps 112(%ecx) + flds 80(%edx) + fadds 108(%edx) + fstps 80(%ecx) + flds 84(%edx) + fadds 104(%edx) + fstps 84(%ecx) + flds 108(%edx) + fsubs 80(%edx) + fmuls 80(%ebx) + fstps 108(%ecx) + flds 104(%edx) + fsubs 84(%edx) + fmuls 84(%ebx) + fstps 104(%ecx) + flds 88(%edx) + fadds 100(%edx) + fstps 88(%ecx) + flds 92(%edx) + fadds 96(%edx) + fstps 92(%ecx) + flds 100(%edx) + fsubs 88(%edx) + fmuls 88(%ebx) + fstps 100(%ecx) + flds 96(%edx) + fsubs 92(%edx) + fmuls 92(%ebx) + fstps 96(%ecx) + + flds (%ecx) + fadds 28(%ecx) + fstps (%edx) + flds (%ecx) + fsubs 28(%ecx) + fmuls 96(%ebx) + fstps 28(%edx) + flds 4(%ecx) + fadds 24(%ecx) + fstps 4(%edx) + flds 4(%ecx) + fsubs 24(%ecx) + fmuls 100(%ebx) + fstps 24(%edx) + flds 8(%ecx) + fadds 20(%ecx) + fstps 8(%edx) + flds 8(%ecx) + fsubs 20(%ecx) + fmuls 104(%ebx) + fstps 20(%edx) + flds 12(%ecx) + fadds 16(%ecx) + fstps 12(%edx) + flds 12(%ecx) + fsubs 16(%ecx) + fmuls 108(%ebx) + fstps 16(%edx) + flds 32(%ecx) + fadds 60(%ecx) + fstps 32(%edx) + flds 60(%ecx) + fsubs 32(%ecx) + fmuls 96(%ebx) + fstps 60(%edx) + flds 36(%ecx) + fadds 56(%ecx) + fstps 36(%edx) + flds 56(%ecx) + fsubs 36(%ecx) + fmuls 100(%ebx) + fstps 56(%edx) + flds 40(%ecx) + fadds 52(%ecx) + fstps 40(%edx) + flds 52(%ecx) + fsubs 40(%ecx) + fmuls 104(%ebx) + fstps 52(%edx) + flds 44(%ecx) + fadds 48(%ecx) + fstps 44(%edx) + flds 48(%ecx) + fsubs 44(%ecx) + fmuls 108(%ebx) + fstps 48(%edx) + flds 64(%ecx) + fadds 92(%ecx) + fstps 64(%edx) + flds 64(%ecx) + fsubs 92(%ecx) + fmuls 96(%ebx) + fstps 92(%edx) + flds 68(%ecx) + fadds 88(%ecx) + fstps 68(%edx) + flds 68(%ecx) + fsubs 88(%ecx) + fmuls 100(%ebx) + fstps 88(%edx) + flds 72(%ecx) + fadds 84(%ecx) + fstps 72(%edx) + flds 72(%ecx) + fsubs 84(%ecx) + fmuls 104(%ebx) + fstps 84(%edx) + flds 76(%ecx) + fadds 80(%ecx) + fstps 76(%edx) + flds 76(%ecx) + fsubs 80(%ecx) + fmuls 108(%ebx) + fstps 80(%edx) + flds 96(%ecx) + fadds 124(%ecx) + fstps 96(%edx) + flds 124(%ecx) + fsubs 96(%ecx) + fmuls 96(%ebx) + fstps 124(%edx) + flds 100(%ecx) + fadds 120(%ecx) + fstps 100(%edx) + flds 120(%ecx) + fsubs 100(%ecx) + fmuls 100(%ebx) + fstps 120(%edx) + flds 104(%ecx) + fadds 116(%ecx) + fstps 104(%edx) + flds 116(%ecx) + fsubs 104(%ecx) + fmuls 104(%ebx) + fstps 116(%edx) + flds 108(%ecx) + fadds 112(%ecx) + fstps 108(%edx) + flds 112(%ecx) + fsubs 108(%ecx) + fmuls 108(%ebx) + fstps 112(%edx) + flds (%edx) + fadds 12(%edx) + fstps (%ecx) + flds (%edx) + fsubs 12(%edx) + fmuls 112(%ebx) + fstps 12(%ecx) + flds 4(%edx) + fadds 8(%edx) + fstps 4(%ecx) + flds 4(%edx) + fsubs 8(%edx) + fmuls 116(%ebx) + fstps 8(%ecx) + flds 16(%edx) + fadds 28(%edx) + fstps 16(%ecx) + flds 28(%edx) + fsubs 16(%edx) + fmuls 112(%ebx) + fstps 28(%ecx) + flds 20(%edx) + fadds 24(%edx) + fstps 20(%ecx) + flds 24(%edx) + fsubs 20(%edx) + fmuls 116(%ebx) + fstps 24(%ecx) + flds 32(%edx) + fadds 44(%edx) + fstps 32(%ecx) + flds 32(%edx) + fsubs 44(%edx) + fmuls 112(%ebx) + fstps 44(%ecx) + flds 36(%edx) + fadds 40(%edx) + fstps 36(%ecx) + flds 36(%edx) + fsubs 40(%edx) + fmuls 116(%ebx) + fstps 40(%ecx) + flds 48(%edx) + fadds 60(%edx) + fstps 48(%ecx) + flds 60(%edx) + fsubs 48(%edx) + fmuls 112(%ebx) + fstps 60(%ecx) + flds 52(%edx) + fadds 56(%edx) + fstps 52(%ecx) + flds 56(%edx) + fsubs 52(%edx) + fmuls 116(%ebx) + fstps 56(%ecx) + flds 64(%edx) + fadds 76(%edx) + fstps 64(%ecx) + flds 64(%edx) + fsubs 76(%edx) + fmuls 112(%ebx) + fstps 76(%ecx) + flds 68(%edx) + fadds 72(%edx) + fstps 68(%ecx) + flds 68(%edx) + fsubs 72(%edx) + fmuls 116(%ebx) + fstps 72(%ecx) + flds 80(%edx) + fadds 92(%edx) + fstps 80(%ecx) + flds 92(%edx) + fsubs 80(%edx) + fmuls 112(%ebx) + fstps 92(%ecx) + flds 84(%edx) + fadds 88(%edx) + fstps 84(%ecx) + flds 88(%edx) + fsubs 84(%edx) + fmuls 116(%ebx) + fstps 88(%ecx) + flds 96(%edx) + fadds 108(%edx) + fstps 96(%ecx) + flds 96(%edx) + fsubs 108(%edx) + fmuls 112(%ebx) + fstps 108(%ecx) + flds 100(%edx) + fadds 104(%edx) + fstps 100(%ecx) + flds 100(%edx) + fsubs 104(%edx) + fmuls 116(%ebx) + fstps 104(%ecx) + flds 112(%edx) + fadds 124(%edx) + fstps 112(%ecx) + flds 124(%edx) + fsubs 112(%edx) + fmuls 112(%ebx) + fstps 124(%ecx) + flds 116(%edx) + fadds 120(%edx) + fstps 116(%ecx) + flds 120(%edx) + fsubs 116(%edx) + fmuls 116(%ebx) + fstps 120(%ecx) + + flds 32(%ecx) + fadds 36(%ecx) + fstps 32(%edx) + flds 32(%ecx) + fsubs 36(%ecx) + fmuls 120(%ebx) + fstps 36(%edx) + flds 44(%ecx) + fsubs 40(%ecx) + fmuls 120(%ebx) + fsts 44(%edx) + fadds 40(%ecx) + fadds 44(%ecx) + fstps 40(%edx) + flds 48(%ecx) + fsubs 52(%ecx) + fmuls 120(%ebx) + flds 60(%ecx) + fsubs 56(%ecx) + fmuls 120(%ebx) + fld %st(0) + fadds 56(%ecx) + fadds 60(%ecx) + fld %st(0) + fadds 48(%ecx) + fadds 52(%ecx) + fstps 48(%edx) + fadd %st(2) + fstps 56(%edx) + fsts 60(%edx) + faddp %st(1) + fstps 52(%edx) + flds 64(%ecx) + fadds 68(%ecx) + fstps 64(%edx) + flds 64(%ecx) + fsubs 68(%ecx) + fmuls 120(%ebx) + fstps 68(%edx) + flds 76(%ecx) + fsubs 72(%ecx) + fmuls 120(%ebx) + fsts 76(%edx) + fadds 72(%ecx) + fadds 76(%ecx) + fstps 72(%edx) + flds 92(%ecx) + fsubs 88(%ecx) + fmuls 120(%ebx) + fsts 92(%edx) + fadds 92(%ecx) + fadds 88(%ecx) + fld %st(0) + fadds 80(%ecx) + fadds 84(%ecx) + fstps 80(%edx) + flds 80(%ecx) + fsubs 84(%ecx) + fmuls 120(%ebx) + fadd %st(0), %st(1) + fadds 92(%edx) + fstps 84(%edx) + fstps 88(%edx) + flds 96(%ecx) + fadds 100(%ecx) + fstps 96(%edx) + flds 96(%ecx) + fsubs 100(%ecx) + fmuls 120(%ebx) + fstps 100(%edx) + flds 108(%ecx) + fsubs 104(%ecx) + fmuls 120(%ebx) + fsts 108(%edx) + fadds 104(%ecx) + fadds 108(%ecx) + fstps 104(%edx) + flds 124(%ecx) + fsubs 120(%ecx) + fmuls 120(%ebx) + fsts 124(%edx) + fadds 120(%ecx) + fadds 124(%ecx) + fld %st(0) + fadds 112(%ecx) + fadds 116(%ecx) + fstps 112(%edx) + flds 112(%ecx) + fsubs 116(%ecx) + fmuls 120(%ebx) + fadd %st(0),%st(1) + fadds 124(%edx) + fstps 116(%edx) + fstps 120(%edx) + jnz .L01 + + flds (%ecx) + fadds 4(%ecx) + fstps 1024(%esi) + flds (%ecx) + fsubs 4(%ecx) + fmuls 120(%ebx) + fsts (%esi) + fstps (%edi) + flds 12(%ecx) + fsubs 8(%ecx) + fmuls 120(%ebx) + fsts 512(%edi) + fadds 12(%ecx) + fadds 8(%ecx) + fstps 512(%esi) + flds 16(%ecx) + fsubs 20(%ecx) + fmuls 120(%ebx) + flds 28(%ecx) + fsubs 24(%ecx) + fmuls 120(%ebx) + fsts 768(%edi) + fld %st(0) + fadds 24(%ecx) + fadds 28(%ecx) + fld %st(0) + fadds 16(%ecx) + fadds 20(%ecx) + fstps 768(%esi) + fadd %st(2) + fstps 256(%esi) + faddp %st(1) + fstps 256(%edi) + + flds 32(%edx) + fadds 48(%edx) + fstps 896(%esi) + flds 48(%edx) + fadds 40(%edx) + fstps 640(%esi) + flds 40(%edx) + fadds 56(%edx) + fstps 384(%esi) + flds 56(%edx) + fadds 36(%edx) + fstps 128(%esi) + flds 36(%edx) + fadds 52(%edx) + fstps 128(%edi) + flds 52(%edx) + fadds 44(%edx) + fstps 384(%edi) + flds 60(%edx) + fsts 896(%edi) + fadds 44(%edx) + fstps 640(%edi) + flds 96(%edx) + fadds 112(%edx) + fld %st(0) + fadds 64(%edx) + fstps 960(%esi) + fadds 80(%edx) + fstps 832(%esi) + flds 112(%edx) + fadds 104(%edx) + fld %st(0) + fadds 80(%edx) + fstps 704(%esi) + fadds 72(%edx) + fstps 576(%esi) + flds 104(%edx) + fadds 120(%edx) + fld %st(0) + fadds 72(%edx) + fstps 448(%esi) + fadds 88(%edx) + fstps 320(%esi) + flds 120(%edx) + fadds 100(%edx) + fld %st(0) + fadds 88(%edx) + fstps 192(%esi) + fadds 68(%edx) + fstps 64(%esi) + flds 100(%edx) + fadds 116(%edx) + fld %st(0) + fadds 68(%edx) + fstps 64(%edi) + fadds 84(%edx) + fstps 192(%edi) + flds 116(%edx) + fadds 108(%edx) + fld %st(0) + fadds 84(%edx) + fstps 320(%edi) + fadds 76(%edx) + fstps 448(%edi) + flds 108(%edx) + fadds 124(%edx) + fld %st(0) + fadds 76(%edx) + fstps 576(%edi) + fadds 92(%edx) + fstps 704(%edi) + flds 124(%edx) + fsts 960(%edi) + fadds 92(%edx) + fstps 832(%edi) + addl $256,%esp + popl %edi + popl %esi + popl %ebx + ret +.L01: + flds (%ecx) + fadds 4(%ecx) + fistps 512(%esi) + flds (%ecx) + fsubs 4(%ecx) + fmuls 120(%ebx) + + fistps (%esi) + + flds 12(%ecx) + fsubs 8(%ecx) + fmuls 120(%ebx) + fists 256(%edi) + fadds 12(%ecx) + fadds 8(%ecx) + fistps 256(%esi) + flds 16(%ecx) + fsubs 20(%ecx) + fmuls 120(%ebx) + flds 28(%ecx) + fsubs 24(%ecx) + fmuls 120(%ebx) + fists 384(%edi) + fld %st(0) + fadds 24(%ecx) + fadds 28(%ecx) + fld %st(0) + fadds 16(%ecx) + fadds 20(%ecx) + fistps 384(%esi) + fadd %st(2) + fistps 128(%esi) + faddp %st(1) + fistps 128(%edi) + + flds 32(%edx) + fadds 48(%edx) + fistps 448(%esi) + flds 48(%edx) + fadds 40(%edx) + fistps 320(%esi) + flds 40(%edx) + fadds 56(%edx) + fistps 192(%esi) + flds 56(%edx) + fadds 36(%edx) + fistps 64(%esi) + flds 36(%edx) + fadds 52(%edx) + fistps 64(%edi) + flds 52(%edx) + fadds 44(%edx) + fistps 192(%edi) + flds 60(%edx) + fists 448(%edi) + fadds 44(%edx) + fistps 320(%edi) + flds 96(%edx) + fadds 112(%edx) + fld %st(0) + fadds 64(%edx) + fistps 480(%esi) + fadds 80(%edx) + fistps 416(%esi) + flds 112(%edx) + fadds 104(%edx) + fld %st(0) + fadds 80(%edx) + fistps 352(%esi) + fadds 72(%edx) + fistps 288(%esi) + flds 104(%edx) + fadds 120(%edx) + fld %st(0) + fadds 72(%edx) + fistps 224(%esi) + fadds 88(%edx) + fistps 160(%esi) + flds 120(%edx) + fadds 100(%edx) + fld %st(0) + fadds 88(%edx) + fistps 96(%esi) + fadds 68(%edx) + fistps 32(%esi) + flds 100(%edx) + fadds 116(%edx) + fld %st(0) + fadds 68(%edx) + fistps 32(%edi) + fadds 84(%edx) + fistps 96(%edi) + flds 116(%edx) + fadds 108(%edx) + fld %st(0) + fadds 84(%edx) + fistps 160(%edi) + fadds 76(%edx) + fistps 224(%edi) + flds 108(%edx) + fadds 124(%edx) + fld %st(0) + fadds 76(%edx) + fistps 288(%edi) + fadds 92(%edx) + fistps 352(%edi) + flds 124(%edx) + fists 480(%edi) + fadds 92(%edx) + fistps 416(%edi) + movsw + addl $256,%esp + popl %edi + popl %esi + popl %ebx + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/dct64_neon.S b/deps/mpg123/src/libmpg123/dct64_neon.S new file mode 100644 index 0000000..a8a3614 --- /dev/null +++ b/deps/mpg123/src/libmpg123/dct64_neon.S @@ -0,0 +1,297 @@ +/* + dct64_neon: ARM NEON optimized dct64 + + copyright 1995-2010 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "mangle.h" + + .text + ALIGN16 +costab_arm: + .word 1056974725 + .word 1057056395 + .word 1057223771 + .word 1057485416 + .word 1057855544 + .word 1058356026 + .word 1059019886 + .word 1059897405 + .word 1061067246 + .word 1062657950 + .word 1064892987 + .word 1066774581 + .word 1069414683 + .word 1073984175 + .word 1079645762 + .word 1092815430 + .word 1057005197 + .word 1057342072 + .word 1058087743 + .word 1059427869 + .word 1061799040 + .word 1065862217 + .word 1071413542 + .word 1084439708 + .word 1057128951 + .word 1058664893 + .word 1063675095 + .word 1076102863 + .word 1057655764 + .word 1067924853 + .word 1060439283 + .word 1060439283 + .globl ASM_NAME(dct64_neon) +ASM_NAME(dct64_neon): + vpush {q4-q7} + + adr r3, costab_arm + vld1.32 {q0, q1}, [r2]! + vld1.32 {q2, q3}, [r2]! + vld1.32 {q4, q5}, [r2]! + vld1.32 {q6, q7}, [r2] + vld1.32 {q12, q13}, [r3, :128]! + vld1.32 {q14, q15}, [r3, :128]! + + vrev64.32 q4, q4 + vrev64.32 q5, q5 + vrev64.32 q6, q6 + vrev64.32 q7, q7 + vswp d8, d9 + vswp d10, d11 + vswp d12, d13 + vswp d14, d15 + + vsub.f32 q8, q0, q7 + vsub.f32 q9, q1, q6 + vsub.f32 q10, q2, q5 + vsub.f32 q11, q3, q4 + vadd.f32 q0, q0, q7 + vadd.f32 q1, q1, q6 + vadd.f32 q2, q2, q5 + vadd.f32 q3, q3, q4 + vmul.f32 q4, q8, q12 + vmul.f32 q5, q9, q13 + vmul.f32 q6, q10, q14 + vmul.f32 q7, q11, q15 + + vld1.32 {q12, q13}, [r3, :128]! + vld1.32 {q14, q15}, [r3, :128] + + vrev64.32 q2, q2 + vrev64.32 q3, q3 + vrev64.32 q6, q6 + vrev64.32 q7, q7 + vswp d4, d5 + vswp d6, d7 + vswp d12, d13 + vswp d14, d15 + + vsub.f32 q8, q0, q3 + vsub.f32 q9, q1, q2 + vsub.f32 q10, q4, q7 + vsub.f32 q11, q5, q6 + vadd.f32 q0, q0, q3 + vadd.f32 q1, q1, q2 + vadd.f32 q4, q4, q7 + vadd.f32 q5, q5, q6 + vmul.f32 q2, q8, q12 + vmul.f32 q3, q9, q13 + vmul.f32 q6, q10, q12 + vmul.f32 q7, q11, q13 + + vrev64.32 q1, q1 + vrev64.32 q3, q3 + vrev64.32 q5, q5 + vrev64.32 q7, q7 + vswp d2, d3 + vswp d6, d7 + vswp d10, d11 + vswp d14, d15 + + vsub.f32 q8, q0, q1 + vsub.f32 q9, q2, q3 + vsub.f32 q10, q4, q5 + vsub.f32 q11, q6, q7 + vadd.f32 q0, q0, q1 + vadd.f32 q2, q2, q3 + vadd.f32 q4, q4, q5 + vadd.f32 q6, q6, q7 + vmul.f32 q1, q8, q14 + vmul.f32 q3, q9, q14 + vmul.f32 q5, q10, q14 + vmul.f32 q7, q11, q14 + + vdup.32 q12, d31[0] + vmov d31, d30 + + vswp d1, d2 + vswp d5, d6 + vswp d9, d10 + vswp d13, d14 + vrev64.32 q1, q1 + vrev64.32 q3, q3 + vrev64.32 q5, q5 + vrev64.32 q7, q7 + + vsub.f32 q8, q0, q1 + vsub.f32 q9, q2, q3 + vsub.f32 q10, q4, q5 + vsub.f32 q11, q6, q7 + vadd.f32 q0, q0, q1 + vadd.f32 q2, q2, q3 + vadd.f32 q4, q4, q5 + vadd.f32 q6, q6, q7 + vmul.f32 q1, q8, q15 + vmul.f32 q3, q9, q15 + vmul.f32 q5, q10, q15 + vmul.f32 q7, q11, q15 + + vtrn.32 q0, q1 + vtrn.32 q2, q3 + vtrn.32 q4, q5 + vtrn.32 q6, q7 + + vsub.f32 q8, q0, q1 + vsub.f32 q9, q2, q3 + vsub.f32 q10, q4, q5 + vsub.f32 q11, q6, q7 + vadd.f32 q0, q0, q1 + vadd.f32 q2, q2, q3 + vadd.f32 q4, q4, q5 + vadd.f32 q6, q6, q7 + vmul.f32 q1, q8, q12 + vmul.f32 q3, q9, q12 + vmul.f32 q5, q10, q12 + vmul.f32 q7, q11, q12 + + vtrn.32 q0, q1 + vtrn.32 q2, q3 + vtrn.32 q4, q5 + vtrn.32 q6, q7 + vswp d1, d2 + vswp d5, d6 + vswp d9, d10 + vswp d13, d14 + + vshr.u64 d16, d1, #32 + vshr.u64 d17, d3, #32 + vshr.u64 d18, d5, #32 + vshr.u64 d19, d7, #32 + vadd.f32 d1, d1, d16 + vadd.f32 d3, d3, d17 + vadd.f32 d5, d5, d18 + vadd.f32 d7, d7, d19 + vshr.u64 d20, d9, #32 + vshr.u64 d21, d11, #32 + vshr.u64 d22, d13, #32 + vshr.u64 d23, d15, #32 + vadd.f32 d9, d9, d20 + vadd.f32 d11, d11, d21 + vadd.f32 d13, d13, d22 + vadd.f32 d15, d15, d23 + + vshr.u64 d16, d2, #32 + vshr.u64 d18, d6, #32 + vshr.u64 d20, d10, #32 + vshr.u64 d22, d14, #32 + vext.8 q8, q1, q8, #8 + vext.8 q9, q3, q9, #8 + vext.8 q10, q5, q10, #8 + vext.8 q11, q7, q11, #8 + vadd.f32 q1, q1, q8 + vadd.f32 q3, q3, q9 + vadd.f32 q5, q5, q10 + vadd.f32 q7, q7, q11 + + vshr.u64 d16, d4, #32 + vshr.u64 d18, d12, #32 + vext.8 q8, q2, q8, #8 + vext.8 q9, q6, q9, #8 + vadd.f32 q2, q2, q3 + vadd.f32 q6, q6, q7 + vadd.f32 q3, q3, q8 + vadd.f32 q7, q7, q9 + + vrev64.32 q8, q4 + vshr.u64 d19, d9, #32 + vext.8 d17, d17, d16, #4 + vswp d9, d10 + vswp d13, d14 + vtrn.32 q4, q5 + vtrn.32 q6, q7 + vmov d16, d9 + vmov d18, d11 + + vadd.f32 q4, q6 + vadd.f32 q5, q7 + vadd.f32 q6, q8 + vadd.f32 q7, q9 + + vmov.i32 q8, #0x4b000000 + vorr.i32 q8, #0x00400000 + vadd.f32 q0, q0, q8 + vadd.f32 q1, q1, q8 + vadd.f32 q2, q2, q8 + vadd.f32 q3, q3, q8 + vadd.f32 q4, q4, q8 + vadd.f32 q5, q5, q8 + vadd.f32 q6, q6, q8 + vadd.f32 q7, q7, q8 + vshl.i32 q0, q0, #10 + vshl.i32 q1, q1, #10 + vshl.i32 q2, q2, #10 + vshl.i32 q3, q3, #10 + vshl.i32 q4, q4, #10 + vshl.i32 q5, q5, #10 + vshl.i32 q6, q6, #10 + vshl.i32 q7, q7, #10 + vqshrn.s32 d0, q0, #10 + vqshrn.s32 d2, q1, #10 + vqshrn.s32 d4, q2, #10 + vqshrn.s32 d6, q3, #10 + vqshrn.s32 d8, q4, #10 + vqshrn.s32 d10, q5, #10 + vqshrn.s32 d12, q6, #10 + vqshrn.s32 d14, q7, #10 + + mov r3, #32 + vst1.16 {d0[1]}, [r0, :16], r3 + vst1.16 {d12[3]}, [r0, :16], r3 + vst1.16 {d6[2]}, [r0, :16], r3 + vst1.16 {d8[3]}, [r0, :16], r3 + vst1.16 {d2[2]}, [r0, :16], r3 + vst1.16 {d12[1]}, [r0, :16], r3 + vst1.16 {d4[2]}, [r0, :16], r3 + vst1.16 {d8[1]}, [r0, :16], r3 + vst1.16 {d0[2]}, [r0, :16], r3 + vst1.16 {d12[2]}, [r0, :16], r3 + vst1.16 {d6[0]}, [r0, :16], r3 + vst1.16 {d8[2]}, [r0, :16], r3 + vst1.16 {d2[0]}, [r0, :16], r3 + vst1.16 {d12[0]}, [r0, :16], r3 + vst1.16 {d4[0]}, [r0, :16], r3 + vst1.16 {d8[0]}, [r0, :16], r3 + vst1.16 {d0[0]}, [r0, :16] + + vst1.16 {d0[1]}, [r1, :16], r3 + vst1.16 {d10[0]}, [r1, :16], r3 + vst1.16 {d4[1]}, [r1, :16], r3 + vst1.16 {d14[0]}, [r1, :16], r3 + vst1.16 {d2[1]}, [r1, :16], r3 + vst1.16 {d10[2]}, [r1, :16], r3 + vst1.16 {d6[1]}, [r1, :16], r3 + vst1.16 {d14[2]}, [r1, :16], r3 + vst1.16 {d0[3]}, [r1, :16], r3 + vst1.16 {d10[1]}, [r1, :16], r3 + vst1.16 {d4[3]}, [r1, :16], r3 + vst1.16 {d14[1]}, [r1, :16], r3 + vst1.16 {d2[3]}, [r1, :16], r3 + vst1.16 {d10[3]}, [r1, :16], r3 + vst1.16 {d6[3]}, [r1, :16], r3 + vst1.16 {d14[3]}, [r1, :16] + + vpop {q4-q7} + bx lr diff --git a/deps/mpg123/src/libmpg123/dct64_neon_float.S b/deps/mpg123/src/libmpg123/dct64_neon_float.S new file mode 100644 index 0000000..fae43aa --- /dev/null +++ b/deps/mpg123/src/libmpg123/dct64_neon_float.S @@ -0,0 +1,270 @@ +/* + dct64_neon_float: ARM NEON optimized dct64 (float output version) + + copyright 1995-2010 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "mangle.h" + + .text + ALIGN16 +costab_arm: + .word 1056974725 + .word 1057056395 + .word 1057223771 + .word 1057485416 + .word 1057855544 + .word 1058356026 + .word 1059019886 + .word 1059897405 + .word 1061067246 + .word 1062657950 + .word 1064892987 + .word 1066774581 + .word 1069414683 + .word 1073984175 + .word 1079645762 + .word 1092815430 + .word 1057005197 + .word 1057342072 + .word 1058087743 + .word 1059427869 + .word 1061799040 + .word 1065862217 + .word 1071413542 + .word 1084439708 + .word 1057128951 + .word 1058664893 + .word 1063675095 + .word 1076102863 + .word 1057655764 + .word 1067924853 + .word 1060439283 + .word 1060439283 + .globl ASM_NAME(dct64_real_neon) +ASM_NAME(dct64_real_neon): + vpush {q4-q7} + + adr r3, costab_arm + vld1.32 {q0, q1}, [r2]! + vld1.32 {q2, q3}, [r2]! + vld1.32 {q4, q5}, [r2]! + vld1.32 {q6, q7}, [r2] + vld1.32 {q12, q13}, [r3, :128]! + vld1.32 {q14, q15}, [r3, :128]! + + vrev64.32 q4, q4 + vrev64.32 q5, q5 + vrev64.32 q6, q6 + vrev64.32 q7, q7 + vswp d8, d9 + vswp d10, d11 + vswp d12, d13 + vswp d14, d15 + + vsub.f32 q8, q0, q7 + vsub.f32 q9, q1, q6 + vsub.f32 q10, q2, q5 + vsub.f32 q11, q3, q4 + vadd.f32 q0, q0, q7 + vadd.f32 q1, q1, q6 + vadd.f32 q2, q2, q5 + vadd.f32 q3, q3, q4 + vmul.f32 q4, q8, q12 + vmul.f32 q5, q9, q13 + vmul.f32 q6, q10, q14 + vmul.f32 q7, q11, q15 + + vld1.32 {q12, q13}, [r3, :128]! + vld1.32 {q14, q15}, [r3, :128] + + vrev64.32 q2, q2 + vrev64.32 q3, q3 + vrev64.32 q6, q6 + vrev64.32 q7, q7 + vswp d4, d5 + vswp d6, d7 + vswp d12, d13 + vswp d14, d15 + + vsub.f32 q8, q0, q3 + vsub.f32 q9, q1, q2 + vsub.f32 q10, q4, q7 + vsub.f32 q11, q5, q6 + vadd.f32 q0, q0, q3 + vadd.f32 q1, q1, q2 + vadd.f32 q4, q4, q7 + vadd.f32 q5, q5, q6 + vmul.f32 q2, q8, q12 + vmul.f32 q3, q9, q13 + vmul.f32 q6, q10, q12 + vmul.f32 q7, q11, q13 + + vrev64.32 q1, q1 + vrev64.32 q3, q3 + vrev64.32 q5, q5 + vrev64.32 q7, q7 + vswp d2, d3 + vswp d6, d7 + vswp d10, d11 + vswp d14, d15 + + vsub.f32 q8, q0, q1 + vsub.f32 q9, q2, q3 + vsub.f32 q10, q4, q5 + vsub.f32 q11, q6, q7 + vadd.f32 q0, q0, q1 + vadd.f32 q2, q2, q3 + vadd.f32 q4, q4, q5 + vadd.f32 q6, q6, q7 + vmul.f32 q1, q8, q14 + vmul.f32 q3, q9, q14 + vmul.f32 q5, q10, q14 + vmul.f32 q7, q11, q14 + + vdup.32 q12, d31[0] + vmov d31, d30 + + vswp d1, d2 + vswp d5, d6 + vswp d9, d10 + vswp d13, d14 + vrev64.32 q1, q1 + vrev64.32 q3, q3 + vrev64.32 q5, q5 + vrev64.32 q7, q7 + + vsub.f32 q8, q0, q1 + vsub.f32 q9, q2, q3 + vsub.f32 q10, q4, q5 + vsub.f32 q11, q6, q7 + vadd.f32 q0, q0, q1 + vadd.f32 q2, q2, q3 + vadd.f32 q4, q4, q5 + vadd.f32 q6, q6, q7 + vmul.f32 q1, q8, q15 + vmul.f32 q3, q9, q15 + vmul.f32 q5, q10, q15 + vmul.f32 q7, q11, q15 + + vtrn.32 q0, q1 + vtrn.32 q2, q3 + vtrn.32 q4, q5 + vtrn.32 q6, q7 + + vsub.f32 q8, q0, q1 + vsub.f32 q9, q2, q3 + vsub.f32 q10, q4, q5 + vsub.f32 q11, q6, q7 + vadd.f32 q0, q0, q1 + vadd.f32 q2, q2, q3 + vadd.f32 q4, q4, q5 + vadd.f32 q6, q6, q7 + vmul.f32 q1, q8, q12 + vmul.f32 q3, q9, q12 + vmul.f32 q5, q10, q12 + vmul.f32 q7, q11, q12 + + vtrn.32 q0, q1 + vtrn.32 q2, q3 + vtrn.32 q4, q5 + vtrn.32 q6, q7 + vswp d1, d2 + vswp d5, d6 + vswp d9, d10 + vswp d13, d14 + + vshr.u64 d16, d1, #32 + vshr.u64 d17, d3, #32 + vshr.u64 d18, d5, #32 + vshr.u64 d19, d7, #32 + vadd.f32 d1, d1, d16 + vadd.f32 d3, d3, d17 + vadd.f32 d5, d5, d18 + vadd.f32 d7, d7, d19 + vshr.u64 d20, d9, #32 + vshr.u64 d21, d11, #32 + vshr.u64 d22, d13, #32 + vshr.u64 d23, d15, #32 + vadd.f32 d9, d9, d20 + vadd.f32 d11, d11, d21 + vadd.f32 d13, d13, d22 + vadd.f32 d15, d15, d23 + + vshr.u64 d16, d2, #32 + vshr.u64 d18, d6, #32 + vshr.u64 d20, d10, #32 + vshr.u64 d22, d14, #32 + vext.8 q8, q1, q8, #8 + vext.8 q9, q3, q9, #8 + vext.8 q10, q5, q10, #8 + vext.8 q11, q7, q11, #8 + vadd.f32 q1, q1, q8 + vadd.f32 q3, q3, q9 + vadd.f32 q5, q5, q10 + vadd.f32 q7, q7, q11 + + vshr.u64 d16, d4, #32 + vshr.u64 d18, d12, #32 + vext.8 q8, q2, q8, #8 + vext.8 q9, q6, q9, #8 + vadd.f32 q2, q2, q3 + vadd.f32 q6, q6, q7 + vadd.f32 q3, q3, q8 + vadd.f32 q7, q7, q9 + + vrev64.32 q8, q4 + vshr.u64 d19, d9, #32 + vext.8 d17, d17, d16, #4 + vswp d9, d10 + vswp d13, d14 + vtrn.32 q4, q5 + vtrn.32 q6, q7 + vmov d16, d9 + vmov d18, d11 + + vadd.f32 q4, q6 + vadd.f32 q5, q7 + vadd.f32 q6, q8 + vadd.f32 q7, q9 + + mov r3, #64 + vst1.32 {d0[1]}, [r0, :32], r3 + vst1.32 {d13[1]}, [r0, :32], r3 + vst1.32 {d7[0]}, [r0, :32], r3 + vst1.32 {d9[1]}, [r0, :32], r3 + vst1.32 {d3[0]}, [r0, :32], r3 + vst1.32 {d12[1]}, [r0, :32], r3 + vst1.32 {d5[0]}, [r0, :32], r3 + vst1.32 {d8[1]}, [r0, :32], r3 + vst1.32 {d1[0]}, [r0, :32], r3 + vst1.32 {d13[0]}, [r0, :32], r3 + vst1.32 {d6[0]}, [r0, :32], r3 + vst1.32 {d9[0]}, [r0, :32], r3 + vst1.32 {d2[0]}, [r0, :32], r3 + vst1.32 {d12[0]}, [r0, :32], r3 + vst1.32 {d4[0]}, [r0, :32], r3 + vst1.32 {d8[0]}, [r0, :32], r3 + vst1.32 {d0[0]}, [r0, :32] + + vst1.32 {d0[1]}, [r1, :32], r3 + vst1.32 {d10[0]}, [r1, :32], r3 + vst1.32 {d4[1]}, [r1, :32], r3 + vst1.32 {d14[0]}, [r1, :32], r3 + vst1.32 {d2[1]}, [r1, :32], r3 + vst1.32 {d11[0]}, [r1, :32], r3 + vst1.32 {d6[1]}, [r1, :32], r3 + vst1.32 {d15[0]}, [r1, :32], r3 + vst1.32 {d1[1]}, [r1, :32], r3 + vst1.32 {d10[1]}, [r1, :32], r3 + vst1.32 {d5[1]}, [r1, :32], r3 + vst1.32 {d14[1]}, [r1, :32], r3 + vst1.32 {d3[1]}, [r1, :32], r3 + vst1.32 {d11[1]}, [r1, :32], r3 + vst1.32 {d7[1]}, [r1, :32], r3 + vst1.32 {d15[1]}, [r1, :32] + + vpop {q4-q7} + bx lr diff --git a/deps/mpg123/src/libmpg123/dct64_sse.S b/deps/mpg123/src/libmpg123/dct64_sse.S new file mode 100644 index 0000000..d9abbcd --- /dev/null +++ b/deps/mpg123/src/libmpg123/dct64_sse.S @@ -0,0 +1,454 @@ +/* + dct64_sse: MMX/SSE optimized dct64 + + copyright 1995-2009 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "mangle.h" + +#define ARG(n) (8+n*4)(%ebp) +#define TEMP(n) (4+n*16)(%esp) +#define TEMP_BYTE(n) (4+n)(%esp) + +/* + void dct64_sse(short *out0, short *out1, real *samples); +*/ + +#ifndef __APPLE__ + .section .rodata +#else + .data +#endif + ALIGN16 +pnpn: + .long 0 + .long -2147483648 + .long 0 + .long -2147483648 + ALIGN16 +mask: + .long -1 + .long -1 + .long -1 + .long 0 + + .text + ALIGN16 +.globl ASM_NAME(dct64_sse) +ASM_NAME(dct64_sse): + pushl %ebp + movl %esp, %ebp + + andl $-16, %esp /* align the stack at 16 bytes */ + subl $128, %esp /* reserve space for temporal store */ + pushl %ebx + + movl ARG(0), %ecx + movl ARG(1), %ebx + movl ARG(2), %eax + + MOVUAPS (%eax), %xmm7 + MOVUAPS 16(%eax), %xmm6 + MOVUAPS 112(%eax), %xmm0 + MOVUAPS 96(%eax), %xmm1 + shufps $0x1b, %xmm0, %xmm0 + shufps $0x1b, %xmm1, %xmm1 + movaps %xmm7, %xmm4 + movaps %xmm6, %xmm5 + addps %xmm0, %xmm4 + addps %xmm1, %xmm5 + subps %xmm0, %xmm7 + subps %xmm1, %xmm6 + movaps %xmm4, TEMP(0) + movaps %xmm5, TEMP(1) + + MOVUAPS 32(%eax), %xmm2 + MOVUAPS 48(%eax), %xmm3 + MOVUAPS 80(%eax), %xmm0 + MOVUAPS 64(%eax), %xmm1 + shufps $0x1b, %xmm0, %xmm0 + shufps $0x1b, %xmm1, %xmm1 + movaps %xmm2, %xmm5 + movaps %xmm3, %xmm4 + addps %xmm0, %xmm2 + addps %xmm1, %xmm3 + subps %xmm0, %xmm5 + subps %xmm1, %xmm4 + + mulps ASM_NAME(costab_mmxsse), %xmm7 + mulps ASM_NAME(costab_mmxsse)+16, %xmm6 + mulps ASM_NAME(costab_mmxsse)+32, %xmm5 + mulps ASM_NAME(costab_mmxsse)+48, %xmm4 + + shufps $0x1b, %xmm2, %xmm2 + shufps $0x1b, %xmm3, %xmm3 + shufps $0x1b, %xmm4, %xmm4 + shufps $0x1b, %xmm5, %xmm5 + movaps TEMP(0), %xmm0 + movaps TEMP(1), %xmm1 + subps %xmm3, %xmm0 + subps %xmm2, %xmm1 + addps TEMP(0), %xmm3 + addps TEMP(1), %xmm2 + movaps %xmm3, TEMP(0) + movaps %xmm2, TEMP(1) + movaps %xmm6, %xmm2 + movaps %xmm7, %xmm3 + subps %xmm5, %xmm6 + subps %xmm4, %xmm7 + addps %xmm3, %xmm4 + addps %xmm2, %xmm5 + mulps ASM_NAME(costab_mmxsse)+64, %xmm0 + mulps ASM_NAME(costab_mmxsse)+80, %xmm1 + mulps ASM_NAME(costab_mmxsse)+80, %xmm6 + mulps ASM_NAME(costab_mmxsse)+64, %xmm7 + + movaps TEMP(0), %xmm2 + movaps TEMP(1), %xmm3 + shufps $0x1b, %xmm3, %xmm3 + shufps $0x1b, %xmm5, %xmm5 + shufps $0x1b, %xmm1, %xmm1 + shufps $0x1b, %xmm6, %xmm6 + movaps %xmm0, TEMP(1) + subps %xmm3, %xmm2 + subps %xmm1, %xmm0 + addps TEMP(0), %xmm3 + addps TEMP(1), %xmm1 + movaps %xmm3, TEMP(0) + movaps %xmm1, TEMP(2) + movaps %xmm5, %xmm1 + movaps %xmm4, %xmm5 + movaps %xmm7, %xmm3 + subps %xmm1, %xmm5 + subps %xmm6, %xmm7 + addps %xmm1, %xmm4 + addps %xmm3, %xmm6 + mulps ASM_NAME(costab_mmxsse)+96, %xmm2 + mulps ASM_NAME(costab_mmxsse)+96, %xmm0 + mulps ASM_NAME(costab_mmxsse)+96, %xmm5 + mulps ASM_NAME(costab_mmxsse)+96, %xmm7 + movaps %xmm2, TEMP(1) + movaps %xmm0, TEMP(3) + + movaps %xmm4, %xmm2 + movaps %xmm5, %xmm3 + shufps $0x44, %xmm6, %xmm2 + shufps $0xbb, %xmm7, %xmm5 + shufps $0xbb, %xmm6, %xmm4 + shufps $0x44, %xmm7, %xmm3 + movaps %xmm2, %xmm6 + movaps %xmm3, %xmm7 + subps %xmm4, %xmm2 + subps %xmm5, %xmm3 + addps %xmm6, %xmm4 + addps %xmm7, %xmm5 + movaps ASM_NAME(costab_mmxsse)+112, %xmm0 + movlhps %xmm0, %xmm0 + mulps %xmm0, %xmm2 + mulps %xmm0, %xmm3 + movaps %xmm0, TEMP(4) + movaps %xmm4, %xmm6 + movaps %xmm5, %xmm7 + shufps $0x14, %xmm2, %xmm4 + shufps $0xbe, %xmm2, %xmm6 + shufps $0x14, %xmm3, %xmm5 + shufps $0xbe, %xmm3, %xmm7 + movaps %xmm5, TEMP(5) + movaps %xmm7, TEMP(7) + + movaps TEMP(0), %xmm0 + movaps TEMP(1), %xmm1 + movaps %xmm0, %xmm2 + movaps %xmm1, %xmm3 + shufps $0x44, TEMP(2), %xmm2 + shufps $0xbb, TEMP(3), %xmm1 + shufps $0xbb, TEMP(2), %xmm0 + shufps $0x44, TEMP(3), %xmm3 + movaps %xmm2, %xmm5 + movaps %xmm3, %xmm7 + subps %xmm0, %xmm2 + subps %xmm1, %xmm3 + addps %xmm5, %xmm0 + addps %xmm7, %xmm1 + mulps TEMP(4), %xmm2 + mulps TEMP(4), %xmm3 + movaps %xmm0, %xmm5 + movaps %xmm1, %xmm7 + shufps $0x14, %xmm2, %xmm0 + shufps $0xbe, %xmm2, %xmm5 + shufps $0x14, %xmm3, %xmm1 + shufps $0xbe, %xmm3, %xmm7 + + movaps %xmm0, TEMP(0) + movaps %xmm1, TEMP(1) + movaps %xmm5, TEMP(2) + movaps %xmm7, TEMP(3) + + movss ASM_NAME(costab_mmxsse)+120, %xmm5 + shufps $0x00, %xmm5, %xmm5 + xorps pnpn, %xmm5 + + movaps %xmm4, %xmm0 + movaps %xmm6, %xmm1 + unpcklps TEMP(5), %xmm4 + unpckhps TEMP(5), %xmm0 + unpcklps TEMP(7), %xmm6 + unpckhps TEMP(7), %xmm1 + movaps %xmm4, %xmm2 + movaps %xmm6, %xmm3 + unpcklps %xmm0, %xmm4 + unpckhps %xmm0, %xmm2 + unpcklps %xmm1, %xmm6 + unpckhps %xmm1, %xmm3 + movaps %xmm4, %xmm0 + movaps %xmm6, %xmm1 + subps %xmm2, %xmm0 + subps %xmm3, %xmm1 + addps %xmm2, %xmm4 + addps %xmm3, %xmm6 + mulps %xmm5, %xmm0 + mulps %xmm5, %xmm1 + movaps %xmm5, TEMP(5) + movaps %xmm4, %xmm5 + movaps %xmm6, %xmm7 + unpcklps %xmm0, %xmm4 + unpckhps %xmm0, %xmm5 + unpcklps %xmm1, %xmm6 + unpckhps %xmm1, %xmm7 + + movaps TEMP(0), %xmm0 + movaps TEMP(2), %xmm2 + movaps %xmm4, TEMP(4) + movaps %xmm6, TEMP(6) + + movaps %xmm0, %xmm4 + movaps %xmm2, %xmm6 + unpcklps TEMP(1), %xmm0 + unpckhps TEMP(1), %xmm4 + unpcklps TEMP(3), %xmm2 + unpckhps TEMP(3), %xmm6 + movaps %xmm0, %xmm1 + movaps %xmm2, %xmm3 + unpcklps %xmm4, %xmm0 + unpckhps %xmm4, %xmm1 + unpcklps %xmm6, %xmm2 + unpckhps %xmm6, %xmm3 + movaps %xmm0, %xmm4 + movaps %xmm2, %xmm6 + subps %xmm1, %xmm4 + subps %xmm3, %xmm6 + addps %xmm1, %xmm0 + addps %xmm3, %xmm2 + mulps TEMP(5), %xmm4 + mulps TEMP(5), %xmm6 + movaps %xmm0, %xmm1 + movaps %xmm2, %xmm3 + unpcklps %xmm4, %xmm0 + unpckhps %xmm4, %xmm1 + unpcklps %xmm6, %xmm2 + unpckhps %xmm6, %xmm3 + + movaps %xmm0, TEMP(0) + movaps %xmm1, TEMP(1) + movaps %xmm2, TEMP(2) + movaps %xmm3, TEMP(3) + movaps %xmm5, TEMP(5) + movaps %xmm7, TEMP(7) + + movss TEMP_BYTE(12), %xmm0 + movss TEMP_BYTE(28), %xmm1 + movss TEMP_BYTE(44), %xmm2 + movss TEMP_BYTE(60), %xmm3 + addss TEMP_BYTE(8), %xmm0 + addss TEMP_BYTE(24), %xmm1 + addss TEMP_BYTE(40), %xmm2 + addss TEMP_BYTE(56), %xmm3 + movss %xmm0, TEMP_BYTE(8) + movss %xmm1, TEMP_BYTE(24) + movss %xmm2, TEMP_BYTE(40) + movss %xmm3, TEMP_BYTE(56) + movss TEMP_BYTE(76), %xmm0 + movss TEMP_BYTE(92), %xmm1 + movss TEMP_BYTE(108), %xmm2 + movss TEMP_BYTE(124), %xmm3 + addss TEMP_BYTE(72), %xmm0 + addss TEMP_BYTE(88), %xmm1 + addss TEMP_BYTE(104), %xmm2 + addss TEMP_BYTE(120), %xmm3 + movss %xmm0, TEMP_BYTE(72) + movss %xmm1, TEMP_BYTE(88) + movss %xmm2, TEMP_BYTE(104) + movss %xmm3, TEMP_BYTE(120) + + movaps TEMP_BYTE(16), %xmm1 + movaps TEMP_BYTE(48), %xmm3 + movaps TEMP_BYTE(80), %xmm5 + movaps TEMP_BYTE(112), %xmm7 + movaps %xmm1, %xmm0 + movaps %xmm3, %xmm2 + movaps %xmm5, %xmm4 + movaps %xmm7, %xmm6 + shufps $0x1e, %xmm0, %xmm0 + shufps $0x1e, %xmm2, %xmm2 + shufps $0x1e, %xmm4, %xmm4 + shufps $0x1e, %xmm6, %xmm6 + andps mask, %xmm0 + andps mask, %xmm2 + andps mask, %xmm4 + andps mask, %xmm6 + addps %xmm0, %xmm1 + addps %xmm2, %xmm3 + addps %xmm4, %xmm5 + addps %xmm6, %xmm7 + + movaps TEMP_BYTE(32), %xmm2 + movaps TEMP_BYTE(96), %xmm6 + movaps %xmm2, %xmm0 + movaps %xmm6, %xmm4 + shufps $0x1e, %xmm0, %xmm0 + shufps $0x1e, %xmm4, %xmm4 + andps mask, %xmm0 + andps mask, %xmm4 + addps %xmm3, %xmm2 + addps %xmm0, %xmm3 + addps %xmm7, %xmm6 + addps %xmm4, %xmm7 + + movaps TEMP_BYTE(0), %xmm0 + movaps TEMP_BYTE(64), %xmm4 + + cvtps2pi %xmm0, %mm0 + cvtps2pi %xmm1, %mm1 + movhlps %xmm0, %xmm0 + movhlps %xmm1, %xmm1 + cvtps2pi %xmm0, %mm2 + cvtps2pi %xmm1, %mm3 + packssdw %mm2, %mm0 + packssdw %mm3, %mm1 + + cvtps2pi %xmm2, %mm2 + cvtps2pi %xmm3, %mm3 + movhlps %xmm2, %xmm2 + movhlps %xmm3, %xmm3 + cvtps2pi %xmm2, %mm4 + cvtps2pi %xmm3, %mm5 + packssdw %mm4, %mm2 + packssdw %mm5, %mm3 + + movd %mm0, %eax + movd %mm1, %edx + movw %ax, 512(%ecx) + movw %dx, 384(%ecx) + shrl $16, %eax + shrl $16, %edx + movw %ax, (%ecx) + movw %ax, (%ebx) + movw %dx, 128(%ebx) + + movd %mm2, %eax + movd %mm3, %edx + movw %ax, 448(%ecx) + movw %dx, 320(%ecx) + shrl $16, %eax + shrl $16, %edx + movw %ax, 64(%ebx) + movw %dx, 192(%ebx) + + psrlq $32, %mm0 + psrlq $32, %mm1 + movd %mm0, %eax + movd %mm1, %edx + movw %ax, 256(%ecx) + movw %dx, 128(%ecx) + shrl $16, %eax + shrl $16, %edx + movw %ax, 256(%ebx) + movw %dx, 384(%ebx) + + psrlq $32, %mm2 + psrlq $32, %mm3 + movd %mm2, %eax + movd %mm3, %edx + movw %ax, 192(%ecx) + movw %dx, 64(%ecx) + shrl $16, %eax + shrl $16, %edx + movw %ax, 320(%ebx) + movw %dx, 448(%ebx) + + movaps %xmm4, %xmm0 + shufps $0x1e, %xmm0, %xmm0 + movaps %xmm5, %xmm1 + andps mask, %xmm0 + + addps %xmm6, %xmm4 + addps %xmm7, %xmm5 + addps %xmm1, %xmm6 + addps %xmm0, %xmm7 + + cvtps2pi %xmm4, %mm0 + cvtps2pi %xmm5, %mm1 + movhlps %xmm4, %xmm4 + movhlps %xmm5, %xmm5 + cvtps2pi %xmm4, %mm2 + cvtps2pi %xmm5, %mm3 + packssdw %mm2, %mm0 + packssdw %mm3, %mm1 + + cvtps2pi %xmm6, %mm2 + cvtps2pi %xmm7, %mm3 + movhlps %xmm6, %xmm6 + movhlps %xmm7, %xmm7 + cvtps2pi %xmm6, %mm4 + cvtps2pi %xmm7, %mm5 + packssdw %mm4, %mm2 + packssdw %mm5, %mm3 + + movd %mm0, %eax + movd %mm2, %edx + movw %ax, 480(%ecx) + movw %dx, 416(%ecx) + shrl $16, %eax + shrl $16, %edx + movw %ax, 32(%ebx) + movw %dx, 96(%ebx) + + psrlq $32, %mm0 + psrlq $32, %mm2 + movd %mm0, %eax + movd %mm2, %edx + movw %ax, 224(%ecx) + movw %dx, 160(%ecx) + shrl $16, %eax + shrl $16, %edx + movw %ax, 288(%ebx) + movw %dx, 352(%ebx) + + movd %mm1, %eax + movd %mm3, %edx + movw %ax, 352(%ecx) + movw %dx, 288(%ecx) + shrl $16, %eax + shrl $16, %edx + movw %ax, 160(%ebx) + movw %dx, 224(%ebx) + + psrlq $32, %mm1 + psrlq $32, %mm3 + movd %mm1, %eax + movd %mm3, %edx + movw %ax, 96(%ecx) + movw %dx, 32(%ecx) + shrl $16, %eax + shrl $16, %edx + movw %ax, 416(%ebx) + movw %dx, 480(%ebx) + + popl %ebx + movl %ebp, %esp + popl %ebp + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/dct64_sse_float.S b/deps/mpg123/src/libmpg123/dct64_sse_float.S new file mode 100644 index 0000000..40a06bf --- /dev/null +++ b/deps/mpg123/src/libmpg123/dct64_sse_float.S @@ -0,0 +1,401 @@ +/* + dct64_sse_float: SSE optimized dct64 (float output version) + + copyright 1995-2009 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "mangle.h" + +#define ARG(n) (8+n*4)(%ebp) +#define TEMP(n) (4+n*16)(%esp) +#define TEMP_BYTE(n) (4+n)(%esp) + +/* + void dct64_real_sse(real *out0, real *out1, real *samples); +*/ + +#ifndef __APPLE__ + .section .rodata +#else + .data +#endif + ALIGN16 +pnpn: + .long 0 + .long -2147483648 + .long 0 + .long -2147483648 + ALIGN16 +mask: + .long -1 + .long -1 + .long -1 + .long 0 + + .text + ALIGN16 +.globl ASM_NAME(dct64_real_sse) +ASM_NAME(dct64_real_sse): + pushl %ebp + movl %esp, %ebp + + andl $-16, %esp /* align the stack at 16 bytes */ + subl $128, %esp /* reserve space for temporal store */ + pushl %ebx + + movl ARG(0), %ecx + movl ARG(1), %ebx + movl ARG(2), %eax + + MOVUAPS (%eax), %xmm7 + MOVUAPS 16(%eax), %xmm6 + MOVUAPS 112(%eax), %xmm0 + MOVUAPS 96(%eax), %xmm1 + shufps $0x1b, %xmm0, %xmm0 + shufps $0x1b, %xmm1, %xmm1 + movaps %xmm7, %xmm4 + movaps %xmm6, %xmm5 + addps %xmm0, %xmm4 + addps %xmm1, %xmm5 + subps %xmm0, %xmm7 + subps %xmm1, %xmm6 + movaps %xmm4, TEMP(0) + movaps %xmm5, TEMP(1) + + MOVUAPS 32(%eax), %xmm2 + MOVUAPS 48(%eax), %xmm3 + MOVUAPS 80(%eax), %xmm0 + MOVUAPS 64(%eax), %xmm1 + shufps $0x1b, %xmm0, %xmm0 + shufps $0x1b, %xmm1, %xmm1 + movaps %xmm2, %xmm5 + movaps %xmm3, %xmm4 + addps %xmm0, %xmm2 + addps %xmm1, %xmm3 + subps %xmm0, %xmm5 + subps %xmm1, %xmm4 + + mulps ASM_NAME(costab_mmxsse), %xmm7 + mulps ASM_NAME(costab_mmxsse)+16, %xmm6 + mulps ASM_NAME(costab_mmxsse)+32, %xmm5 + mulps ASM_NAME(costab_mmxsse)+48, %xmm4 + + shufps $0x1b, %xmm2, %xmm2 + shufps $0x1b, %xmm3, %xmm3 + shufps $0x1b, %xmm4, %xmm4 + shufps $0x1b, %xmm5, %xmm5 + movaps TEMP(0), %xmm0 + movaps TEMP(1), %xmm1 + subps %xmm3, %xmm0 + subps %xmm2, %xmm1 + addps TEMP(0), %xmm3 + addps TEMP(1), %xmm2 + movaps %xmm3, TEMP(0) + movaps %xmm2, TEMP(1) + movaps %xmm6, %xmm2 + movaps %xmm7, %xmm3 + subps %xmm5, %xmm6 + subps %xmm4, %xmm7 + addps %xmm3, %xmm4 + addps %xmm2, %xmm5 + mulps ASM_NAME(costab_mmxsse)+64, %xmm0 + mulps ASM_NAME(costab_mmxsse)+80, %xmm1 + mulps ASM_NAME(costab_mmxsse)+80, %xmm6 + mulps ASM_NAME(costab_mmxsse)+64, %xmm7 + + movaps TEMP(0), %xmm2 + movaps TEMP(1), %xmm3 + shufps $0x1b, %xmm3, %xmm3 + shufps $0x1b, %xmm5, %xmm5 + shufps $0x1b, %xmm1, %xmm1 + shufps $0x1b, %xmm6, %xmm6 + movaps %xmm0, TEMP(1) + subps %xmm3, %xmm2 + subps %xmm1, %xmm0 + addps TEMP(0), %xmm3 + addps TEMP(1), %xmm1 + movaps %xmm3, TEMP(0) + movaps %xmm1, TEMP(2) + movaps %xmm5, %xmm1 + movaps %xmm4, %xmm5 + movaps %xmm7, %xmm3 + subps %xmm1, %xmm5 + subps %xmm6, %xmm7 + addps %xmm1, %xmm4 + addps %xmm3, %xmm6 + mulps ASM_NAME(costab_mmxsse)+96, %xmm2 + mulps ASM_NAME(costab_mmxsse)+96, %xmm0 + mulps ASM_NAME(costab_mmxsse)+96, %xmm5 + mulps ASM_NAME(costab_mmxsse)+96, %xmm7 + movaps %xmm2, TEMP(1) + movaps %xmm0, TEMP(3) + + movaps %xmm4, %xmm2 + movaps %xmm5, %xmm3 + shufps $0x44, %xmm6, %xmm2 + shufps $0xbb, %xmm7, %xmm5 + shufps $0xbb, %xmm6, %xmm4 + shufps $0x44, %xmm7, %xmm3 + movaps %xmm2, %xmm6 + movaps %xmm3, %xmm7 + subps %xmm4, %xmm2 + subps %xmm5, %xmm3 + addps %xmm6, %xmm4 + addps %xmm7, %xmm5 + movaps ASM_NAME(costab_mmxsse)+112, %xmm0 + movlhps %xmm0, %xmm0 + mulps %xmm0, %xmm2 + mulps %xmm0, %xmm3 + movaps %xmm0, TEMP(4) + movaps %xmm4, %xmm6 + movaps %xmm5, %xmm7 + shufps $0x14, %xmm2, %xmm4 + shufps $0xbe, %xmm2, %xmm6 + shufps $0x14, %xmm3, %xmm5 + shufps $0xbe, %xmm3, %xmm7 + movaps %xmm5, TEMP(5) + movaps %xmm7, TEMP(7) + + movaps TEMP(0), %xmm0 + movaps TEMP(1), %xmm1 + movaps %xmm0, %xmm2 + movaps %xmm1, %xmm3 + shufps $0x44, TEMP(2), %xmm2 + shufps $0xbb, TEMP(3), %xmm1 + shufps $0xbb, TEMP(2), %xmm0 + shufps $0x44, TEMP(3), %xmm3 + movaps %xmm2, %xmm5 + movaps %xmm3, %xmm7 + subps %xmm0, %xmm2 + subps %xmm1, %xmm3 + addps %xmm5, %xmm0 + addps %xmm7, %xmm1 + mulps TEMP(4), %xmm2 + mulps TEMP(4), %xmm3 + movaps %xmm0, %xmm5 + movaps %xmm1, %xmm7 + shufps $0x14, %xmm2, %xmm0 + shufps $0xbe, %xmm2, %xmm5 + shufps $0x14, %xmm3, %xmm1 + shufps $0xbe, %xmm3, %xmm7 + + movaps %xmm0, TEMP(0) + movaps %xmm1, TEMP(1) + movaps %xmm5, TEMP(2) + movaps %xmm7, TEMP(3) + + movss ASM_NAME(costab_mmxsse)+120, %xmm5 + shufps $0x00, %xmm5, %xmm5 + xorps pnpn, %xmm5 + + movaps %xmm4, %xmm0 + movaps %xmm6, %xmm1 + unpcklps TEMP(5), %xmm4 + unpckhps TEMP(5), %xmm0 + unpcklps TEMP(7), %xmm6 + unpckhps TEMP(7), %xmm1 + movaps %xmm4, %xmm2 + movaps %xmm6, %xmm3 + unpcklps %xmm0, %xmm4 + unpckhps %xmm0, %xmm2 + unpcklps %xmm1, %xmm6 + unpckhps %xmm1, %xmm3 + movaps %xmm4, %xmm0 + movaps %xmm6, %xmm1 + subps %xmm2, %xmm0 + subps %xmm3, %xmm1 + addps %xmm2, %xmm4 + addps %xmm3, %xmm6 + mulps %xmm5, %xmm0 + mulps %xmm5, %xmm1 + movaps %xmm5, TEMP(5) + movaps %xmm4, %xmm5 + movaps %xmm6, %xmm7 + unpcklps %xmm0, %xmm4 + unpckhps %xmm0, %xmm5 + unpcklps %xmm1, %xmm6 + unpckhps %xmm1, %xmm7 + + movaps TEMP(0), %xmm0 + movaps TEMP(2), %xmm2 + movaps %xmm4, TEMP(4) + movaps %xmm6, TEMP(6) + + movaps %xmm0, %xmm4 + movaps %xmm2, %xmm6 + unpcklps TEMP(1), %xmm0 + unpckhps TEMP(1), %xmm4 + unpcklps TEMP(3), %xmm2 + unpckhps TEMP(3), %xmm6 + movaps %xmm0, %xmm1 + movaps %xmm2, %xmm3 + unpcklps %xmm4, %xmm0 + unpckhps %xmm4, %xmm1 + unpcklps %xmm6, %xmm2 + unpckhps %xmm6, %xmm3 + movaps %xmm0, %xmm4 + movaps %xmm2, %xmm6 + subps %xmm1, %xmm4 + subps %xmm3, %xmm6 + addps %xmm1, %xmm0 + addps %xmm3, %xmm2 + mulps TEMP(5), %xmm4 + mulps TEMP(5), %xmm6 + movaps %xmm0, %xmm1 + movaps %xmm2, %xmm3 + unpcklps %xmm4, %xmm0 + unpckhps %xmm4, %xmm1 + unpcklps %xmm6, %xmm2 + unpckhps %xmm6, %xmm3 + + movaps %xmm0, TEMP(0) + movaps %xmm1, TEMP(1) + movaps %xmm2, TEMP(2) + movaps %xmm3, TEMP(3) + movaps %xmm5, TEMP(5) + movaps %xmm7, TEMP(7) + + movss TEMP_BYTE(12), %xmm0 + movss TEMP_BYTE(28), %xmm1 + movss TEMP_BYTE(44), %xmm2 + movss TEMP_BYTE(60), %xmm3 + addss TEMP_BYTE(8), %xmm0 + addss TEMP_BYTE(24), %xmm1 + addss TEMP_BYTE(40), %xmm2 + addss TEMP_BYTE(56), %xmm3 + movss %xmm0, TEMP_BYTE(8) + movss %xmm1, TEMP_BYTE(24) + movss %xmm2, TEMP_BYTE(40) + movss %xmm3, TEMP_BYTE(56) + movss TEMP_BYTE(76), %xmm0 + movss TEMP_BYTE(92), %xmm1 + movss TEMP_BYTE(108), %xmm2 + movss TEMP_BYTE(124), %xmm3 + addss TEMP_BYTE(72), %xmm0 + addss TEMP_BYTE(88), %xmm1 + addss TEMP_BYTE(104), %xmm2 + addss TEMP_BYTE(120), %xmm3 + movss %xmm0, TEMP_BYTE(72) + movss %xmm1, TEMP_BYTE(88) + movss %xmm2, TEMP_BYTE(104) + movss %xmm3, TEMP_BYTE(120) + + movaps TEMP_BYTE(16), %xmm1 + movaps TEMP_BYTE(48), %xmm3 + movaps TEMP_BYTE(80), %xmm5 + movaps TEMP_BYTE(112), %xmm7 + movaps %xmm1, %xmm0 + movaps %xmm3, %xmm2 + movaps %xmm5, %xmm4 + movaps %xmm7, %xmm6 + shufps $0x1e, %xmm0, %xmm0 + shufps $0x1e, %xmm2, %xmm2 + shufps $0x1e, %xmm4, %xmm4 + shufps $0x1e, %xmm6, %xmm6 + andps mask, %xmm0 + andps mask, %xmm2 + andps mask, %xmm4 + andps mask, %xmm6 + addps %xmm0, %xmm1 + addps %xmm2, %xmm3 + addps %xmm4, %xmm5 + addps %xmm6, %xmm7 + + movaps TEMP_BYTE(32), %xmm2 + movaps TEMP_BYTE(96), %xmm6 + movaps %xmm2, %xmm0 + movaps %xmm6, %xmm4 + shufps $0x1e, %xmm0, %xmm0 + shufps $0x1e, %xmm4, %xmm4 + andps mask, %xmm0 + andps mask, %xmm4 + addps %xmm3, %xmm2 + addps %xmm0, %xmm3 + addps %xmm7, %xmm6 + addps %xmm4, %xmm7 + + movaps TEMP_BYTE(0), %xmm0 + movaps TEMP_BYTE(64), %xmm4 + + movss %xmm0, 1024(%ecx) + movss %xmm2, 896(%ecx) + movss %xmm1, 768(%ecx) + movss %xmm3, 640(%ecx) + + shufps $0xe1, %xmm0, %xmm0 + shufps $0xe1, %xmm2, %xmm2 + shufps $0xe1, %xmm1, %xmm1 + shufps $0xe1, %xmm3, %xmm3 + movss %xmm0, (%ecx) + movss %xmm0, (%ebx) + movss %xmm2, 128(%ebx) + movss %xmm1, 256(%ebx) + movss %xmm3, 384(%ebx) + + movhlps %xmm0, %xmm0 + movhlps %xmm2, %xmm2 + movhlps %xmm1, %xmm1 + movhlps %xmm3, %xmm3 + movss %xmm0, 512(%ecx) + movss %xmm2, 384(%ecx) + movss %xmm1, 256(%ecx) + movss %xmm3, 128(%ecx) + + shufps $0xe1, %xmm0, %xmm0 + shufps $0xe1, %xmm2, %xmm2 + shufps $0xe1, %xmm1, %xmm1 + shufps $0xe1, %xmm3, %xmm3 + movss %xmm0, 512(%ebx) + movss %xmm2, 640(%ebx) + movss %xmm1, 768(%ebx) + movss %xmm3, 896(%ebx) + + movaps %xmm4, %xmm0 + shufps $0x1e, %xmm0, %xmm0 + movaps %xmm5, %xmm1 + andps mask, %xmm0 + + addps %xmm6, %xmm4 + addps %xmm7, %xmm5 + addps %xmm1, %xmm6 + addps %xmm0, %xmm7 + + movss %xmm4, 960(%ecx) + movss %xmm6, 832(%ecx) + movss %xmm5, 704(%ecx) + movss %xmm7, 576(%ecx) + movhlps %xmm4, %xmm0 + movhlps %xmm6, %xmm1 + movhlps %xmm5, %xmm2 + movhlps %xmm7, %xmm3 + movss %xmm0, 448(%ecx) + movss %xmm1, 320(%ecx) + movss %xmm2, 192(%ecx) + movss %xmm3, 64(%ecx) + + shufps $0xe1, %xmm4, %xmm4 + shufps $0xe1, %xmm6, %xmm6 + shufps $0xe1, %xmm5, %xmm5 + shufps $0xe1, %xmm7, %xmm7 + movss %xmm4, 64(%ebx) + movss %xmm6, 192(%ebx) + movss %xmm5, 320(%ebx) + movss %xmm7, 448(%ebx) + + shufps $0xe1, %xmm0, %xmm0 + shufps $0xe1, %xmm1, %xmm1 + shufps $0xe1, %xmm2, %xmm2 + shufps $0xe1, %xmm3, %xmm3 + movss %xmm0, 576(%ebx) + movss %xmm1, 704(%ebx) + movss %xmm2, 832(%ebx) + movss %xmm3, 960(%ebx) + + popl %ebx + movl %ebp, %esp + popl %ebp + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/dct64_x86_64.S b/deps/mpg123/src/libmpg123/dct64_x86_64.S new file mode 100644 index 0000000..0144039 --- /dev/null +++ b/deps/mpg123/src/libmpg123/dct64_x86_64.S @@ -0,0 +1,464 @@ +/* + dct64_x86_64: SSE optimized dct64 for x86-64 + + copyright 1995-2009 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "mangle.h" + +#ifdef _WIN64 +/* short *out0 */ +#define ARG0 %r9 +/* short *out1 */ +#define ARG1 %rdx +/* real *samples */ +#define ARG2 %r8 +#else +/* short *out0 */ +#define ARG0 %rdi +/* short *out1 */ +#define ARG1 %rsi +/* real *samples */ +#define ARG2 %rdx +#endif + +/* + void dct64_x86_64(short *out0, short *out1, real *samples); +*/ + +#ifndef __APPLE__ + .section .rodata +#else + .data +#endif + ALIGN32 +ASM_NAME(costab_x86_64): + .long 1056974725 + .long 1057056395 + .long 1057223771 + .long 1057485416 + .long 1057855544 + .long 1058356026 + .long 1059019886 + .long 1059897405 + .long 1061067246 + .long 1062657950 + .long 1064892987 + .long 1066774581 + .long 1069414683 + .long 1073984175 + .long 1079645762 + .long 1092815430 + .long 1057005197 + .long 1057342072 + .long 1058087743 + .long 1059427869 + .long 1061799040 + .long 1065862217 + .long 1071413542 + .long 1084439708 + .long 1057128951 + .long 1058664893 + .long 1063675095 + .long 1076102863 + .long 1057655764 + .long 1067924853 + .long 1060439283 + .long 0 + .text + ALIGN16 +.globl ASM_NAME(dct64_x86_64) +ASM_NAME(dct64_x86_64): +#ifdef _WIN64 /* should save xmm6-15 */ + movq %rcx, ARG0 + subq $168, %rsp /* stack alignment + 10 xmm registers */ + movaps %xmm6, (%rsp) + movaps %xmm7, 16(%rsp) + movaps %xmm8, 32(%rsp) + movaps %xmm9, 48(%rsp) + movaps %xmm10, 64(%rsp) + movaps %xmm11, 80(%rsp) + movaps %xmm12, 96(%rsp) + movaps %xmm13, 112(%rsp) + movaps %xmm14, 128(%rsp) + movaps %xmm15, 144(%rsp) +#endif + + leaq ASM_NAME(costab_x86_64)(%rip), %rcx + + MOVUAPS (ARG2), %xmm15 + MOVUAPS 16(ARG2), %xmm14 + MOVUAPS 112(ARG2), %xmm0 + MOVUAPS 96(ARG2), %xmm1 + shufps $0x1b, %xmm0, %xmm0 + shufps $0x1b, %xmm1, %xmm1 + movaps %xmm15, %xmm8 + movaps %xmm14, %xmm9 + addps %xmm0, %xmm8 + addps %xmm1, %xmm9 + subps %xmm0, %xmm15 + subps %xmm1, %xmm14 + + MOVUAPS 32(ARG2), %xmm13 + MOVUAPS 48(ARG2), %xmm12 + MOVUAPS 80(ARG2), %xmm0 + MOVUAPS 64(ARG2), %xmm1 + shufps $0x1b, %xmm0, %xmm0 + shufps $0x1b, %xmm1, %xmm1 + movaps %xmm13, %xmm10 + movaps %xmm12, %xmm11 + addps %xmm0, %xmm10 + addps %xmm1, %xmm11 + subps %xmm0, %xmm13 + subps %xmm1, %xmm12 + + movaps (%rcx), %xmm0 + movaps 16(%rcx), %xmm1 + movaps 32(%rcx), %xmm2 + movaps 48(%rcx), %xmm3 + mulps %xmm0, %xmm15 + mulps %xmm1, %xmm14 + mulps %xmm2, %xmm13 + mulps %xmm3, %xmm12 + + movaps 64(%rcx), %xmm0 + movaps 80(%rcx), %xmm1 + + pshufd $0x1b, %xmm11, %xmm2 + pshufd $0x1b, %xmm10, %xmm3 + shufps $0x1b, %xmm13, %xmm13 + shufps $0x1b, %xmm12, %xmm12 + movaps %xmm8, %xmm11 + movaps %xmm9, %xmm10 + movaps %xmm14, %xmm4 + movaps %xmm15, %xmm5 + subps %xmm2, %xmm11 + subps %xmm3, %xmm10 + subps %xmm13, %xmm14 + subps %xmm12, %xmm15 + addps %xmm2, %xmm8 + addps %xmm3, %xmm9 + addps %xmm5, %xmm12 + addps %xmm4, %xmm13 + mulps %xmm0, %xmm11 + mulps %xmm1, %xmm10 + mulps %xmm1, %xmm14 + mulps %xmm0, %xmm15 + + movaps 96(%rcx), %xmm0 + + pshufd $0x1b, %xmm9, %xmm1 + pshufd $0x1b, %xmm13, %xmm2 + shufps $0x1b, %xmm10, %xmm10 + shufps $0x1b, %xmm14, %xmm14 + movaps %xmm8, %xmm9 + movaps %xmm12, %xmm13 + movaps %xmm11, %xmm3 + movaps %xmm15, %xmm4 + subps %xmm1, %xmm9 + subps %xmm2, %xmm13 + subps %xmm10, %xmm11 + subps %xmm14, %xmm15 + addps %xmm1, %xmm8 + addps %xmm2, %xmm12 + addps %xmm3, %xmm10 + addps %xmm4, %xmm14 + mulps %xmm0, %xmm9 + mulps %xmm0, %xmm13 + mulps %xmm0, %xmm11 + mulps %xmm0, %xmm15 + + movaps 112(%rcx), %xmm0 + movaps %xmm0, %xmm1 + movlhps %xmm1, %xmm1 + + movaps %xmm8, %xmm2 + movaps %xmm9, %xmm3 + shufps $0x44, %xmm10, %xmm2 + shufps $0xbb, %xmm11, %xmm9 + shufps $0xbb, %xmm10, %xmm8 + shufps $0x44, %xmm11, %xmm3 + movaps %xmm2, %xmm4 + movaps %xmm3, %xmm5 + subps %xmm8, %xmm2 + subps %xmm9, %xmm3 + addps %xmm4, %xmm8 + addps %xmm5, %xmm9 + mulps %xmm1, %xmm2 + mulps %xmm1, %xmm3 + movaps %xmm8, %xmm10 + movaps %xmm9, %xmm11 + shufps $0x14, %xmm2, %xmm8 + shufps $0xbe, %xmm2, %xmm10 + shufps $0x14, %xmm3, %xmm9 + shufps $0xbe, %xmm3, %xmm11 + + movaps %xmm12, %xmm2 + movaps %xmm13, %xmm3 + shufps $0x44, %xmm14, %xmm2 + shufps $0xbb, %xmm15, %xmm13 + shufps $0xbb, %xmm14, %xmm12 + shufps $0x44, %xmm15, %xmm3 + movaps %xmm2, %xmm4 + movaps %xmm3, %xmm5 + subps %xmm12, %xmm2 + subps %xmm13, %xmm3 + addps %xmm4, %xmm12 + addps %xmm5, %xmm13 + mulps %xmm1, %xmm2 + mulps %xmm1, %xmm3 + movaps %xmm12, %xmm14 + movaps %xmm13, %xmm15 + shufps $0x14, %xmm2, %xmm12 + shufps $0xbe, %xmm2, %xmm14 + shufps $0x14, %xmm3, %xmm13 + shufps $0xbe, %xmm3, %xmm15 + + shufps $0xaa, %xmm0, %xmm0 + pcmpeqd %xmm1, %xmm1 + pslld $31, %xmm1 + psllq $32, %xmm1 + xorps %xmm1, %xmm0 + + movaps %xmm8, %xmm1 + movaps %xmm10, %xmm2 + unpcklps %xmm9, %xmm8 + unpckhps %xmm9, %xmm1 + unpcklps %xmm11, %xmm10 + unpckhps %xmm11, %xmm2 + movaps %xmm8, %xmm3 + movaps %xmm10, %xmm4 + unpcklps %xmm1, %xmm8 + unpckhps %xmm1, %xmm3 + unpcklps %xmm2, %xmm10 + unpckhps %xmm2, %xmm4 + movaps %xmm8, %xmm1 + movaps %xmm10, %xmm2 + subps %xmm3, %xmm1 + subps %xmm4, %xmm2 + addps %xmm3, %xmm8 + addps %xmm4, %xmm10 + mulps %xmm0, %xmm1 + mulps %xmm0, %xmm2 + movaps %xmm8, %xmm9 + movaps %xmm10, %xmm11 + unpcklps %xmm1, %xmm8 + unpckhps %xmm1, %xmm9 + unpcklps %xmm2, %xmm10 + unpckhps %xmm2, %xmm11 + + movaps %xmm12, %xmm1 + movaps %xmm14, %xmm2 + unpcklps %xmm13, %xmm12 + unpckhps %xmm13, %xmm1 + unpcklps %xmm15, %xmm14 + unpckhps %xmm15, %xmm2 + movaps %xmm12, %xmm3 + movaps %xmm14, %xmm4 + unpcklps %xmm1, %xmm12 + unpckhps %xmm1, %xmm3 + unpcklps %xmm2, %xmm14 + unpckhps %xmm2, %xmm4 + movaps %xmm12, %xmm1 + movaps %xmm14, %xmm2 + subps %xmm3, %xmm1 + subps %xmm4, %xmm2 + addps %xmm3, %xmm12 + addps %xmm4, %xmm14 + mulps %xmm0, %xmm1 + mulps %xmm0, %xmm2 + movaps %xmm12, %xmm13 + movaps %xmm14, %xmm15 + unpcklps %xmm1, %xmm12 + unpckhps %xmm1, %xmm13 + unpcklps %xmm2, %xmm14 + unpckhps %xmm2, %xmm15 + + + xorps %xmm0, %xmm0 + xorps %xmm1, %xmm1 + shufpd $0x2, %xmm8, %xmm0 + shufpd $0x2, %xmm9, %xmm1 + psrlq $32, %xmm0 + psrlq $32, %xmm1 + addps %xmm0, %xmm8 + addps %xmm1, %xmm9 + + xorps %xmm0, %xmm0 + xorps %xmm1, %xmm1 + shufpd $0x2, %xmm10, %xmm0 + shufpd $0x2, %xmm11, %xmm1 + psrlq $32, %xmm0 + psrlq $32, %xmm1 + addps %xmm0, %xmm10 + addps %xmm1, %xmm11 + + xorps %xmm0, %xmm0 + xorps %xmm1, %xmm1 + shufpd $0x2, %xmm12, %xmm0 + shufpd $0x2, %xmm13, %xmm1 + psrlq $32, %xmm0 + psrlq $32, %xmm1 + addps %xmm0, %xmm12 + addps %xmm1, %xmm13 + + xorps %xmm0, %xmm0 + xorps %xmm1, %xmm1 + shufpd $0x2, %xmm14, %xmm0 + shufpd $0x2, %xmm15, %xmm1 + psrlq $32, %xmm0 + psrlq $32, %xmm1 + addps %xmm0, %xmm14 + addps %xmm1, %xmm15 + + pshufd $0x78, %xmm9, %xmm0 + pshufd $0x78, %xmm11, %xmm1 + pshufd $0x78, %xmm13, %xmm2 + pshufd $0x78, %xmm15, %xmm3 + psrldq $4, %xmm0 + psrldq $4, %xmm1 + psrldq $4, %xmm2 + psrldq $4, %xmm3 + addps %xmm0, %xmm9 + addps %xmm1, %xmm11 + addps %xmm2, %xmm13 + addps %xmm3, %xmm15 + + pshufd $0x78, %xmm10, %xmm0 + pshufd $0x78, %xmm14, %xmm1 + psrldq $4, %xmm0 + psrldq $4, %xmm1 + addps %xmm11, %xmm10 + addps %xmm15, %xmm14 + addps %xmm0, %xmm11 + addps %xmm1, %xmm15 + + cvtps2dq %xmm8, %xmm8 + cvtps2dq %xmm9, %xmm9 + cvtps2dq %xmm10, %xmm10 + cvtps2dq %xmm11, %xmm11 + packssdw %xmm10, %xmm8 + packssdw %xmm11, %xmm9 + + movd %xmm8, %eax + movd %xmm9, %ecx + movw %ax, 512(ARG0) + movw %cx, 384(ARG0) + shrl $16, %eax + shrl $16, %ecx + movw %ax, (ARG0) + movw %ax, (ARG1) + movw %cx, 128(ARG1) + + movhlps %xmm8, %xmm0 + movhlps %xmm9, %xmm1 + movd %xmm0, %eax + movd %xmm1, %ecx + movw %ax, 448(ARG0) + movw %cx, 320(ARG0) + shrl $16, %eax + shrl $16, %ecx + movw %ax, 64(ARG1) + movw %cx, 192(ARG1) + + pshuflw $0xee, %xmm8, %xmm2 + pshuflw $0xee, %xmm9, %xmm3 + movd %xmm2, %eax + movd %xmm3, %ecx + movw %ax, 256(ARG0) + movw %cx, 128(ARG0) + shrl $16, %eax + shrl $16, %ecx + movw %ax, 256(ARG1) + movw %cx, 384(ARG1) + + pshuflw $0xee, %xmm0, %xmm0 + pshuflw $0xee, %xmm1, %xmm1 + movd %xmm0, %eax + movd %xmm1, %ecx + movw %ax, 192(ARG0) + movw %cx, 64(ARG0) + shrl $16, %eax + shrl $16, %ecx + movw %ax, 320(ARG1) + movw %cx, 448(ARG1) + + movaps %xmm12, %xmm0 + movaps %xmm13, %xmm1 + movaps %xmm14, %xmm2 + movaps %xmm15, %xmm3 + shufps $0x1e, %xmm0, %xmm0 + pslldq $4, %xmm0 + psrldq $4, %xmm0 + addps %xmm2, %xmm12 + addps %xmm3, %xmm13 + addps %xmm1, %xmm14 + addps %xmm0, %xmm15 + + cvtps2dq %xmm12, %xmm12 + cvtps2dq %xmm13, %xmm13 + cvtps2dq %xmm14, %xmm14 + cvtps2dq %xmm15, %xmm15 + packssdw %xmm13, %xmm12 + packssdw %xmm15, %xmm14 + + movd %xmm12, %eax + movd %xmm14, %ecx + movw %ax, 480(ARG0) + movw %cx, 416(ARG0) + shrl $16, %eax + shrl $16, %ecx + movw %ax, 32(ARG1) + movw %cx, 96(ARG1) + + pshuflw $0xee, %xmm12, %xmm0 + pshuflw $0xee, %xmm14, %xmm1 + movd %xmm0, %eax + movd %xmm1, %ecx + movw %ax, 224(ARG0) + movw %cx, 160(ARG0) + shrl $16, %eax + shrl $16, %ecx + movw %ax, 288(ARG1) + movw %cx, 352(ARG1) + + movhlps %xmm12, %xmm0 + movhlps %xmm14, %xmm1 + movd %xmm0, %eax + movd %xmm1, %ecx + movw %ax, 352(ARG0) + movw %cx, 288(ARG0) + shrl $16, %eax + shrl $16, %ecx + movw %ax, 160(ARG1) + movw %cx, 224(ARG1) + + pshuflw $0xee, %xmm0, %xmm0 + pshuflw $0xee, %xmm1, %xmm1 + movd %xmm0, %eax + movd %xmm1, %ecx + movw %ax, 96(ARG0) + movw %cx, 32(ARG0) + shrl $16, %eax + shrl $16, %ecx + movw %ax, 416(ARG1) + movw %cx, 480(ARG1) + +#ifdef _WIN64 + movaps (%rsp), %xmm6 + movaps 16(%rsp), %xmm7 + movaps 32(%rsp), %xmm8 + movaps 48(%rsp), %xmm9 + movaps 64(%rsp), %xmm10 + movaps 80(%rsp), %xmm11 + movaps 96(%rsp), %xmm12 + movaps 112(%rsp), %xmm13 + movaps 128(%rsp), %xmm14 + movaps 144(%rsp), %xmm15 + addq $168, %rsp +#endif + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/dct64_x86_64_float.S b/deps/mpg123/src/libmpg123/dct64_x86_64_float.S new file mode 100644 index 0000000..168a321 --- /dev/null +++ b/deps/mpg123/src/libmpg123/dct64_x86_64_float.S @@ -0,0 +1,426 @@ +/* + dct64_x86_64_float: SSE optimized dct64 for x86-64 (float output version) + + copyright 1995-2009 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "mangle.h" + +#ifdef _WIN64 +/* short *out0 */ +#define ARG0 %r9 +/* short *out1 */ +#define ARG1 %rdx +/* real *samples */ +#define ARG2 %r8 +#else +/* real *out0 */ +#define ARG0 %rdi +/* real *out1 */ +#define ARG1 %rsi +/* real *samples */ +#define ARG2 %rdx +#endif + +/* + void dct64_real_x86_64(real *out0, real *out1, real *samples); +*/ + +#ifndef __APPLE__ + .section .rodata +#else + .data +#endif + ALIGN32 +ASM_NAME(costab_x86_64): + .long 1056974725 + .long 1057056395 + .long 1057223771 + .long 1057485416 + .long 1057855544 + .long 1058356026 + .long 1059019886 + .long 1059897405 + .long 1061067246 + .long 1062657950 + .long 1064892987 + .long 1066774581 + .long 1069414683 + .long 1073984175 + .long 1079645762 + .long 1092815430 + .long 1057005197 + .long 1057342072 + .long 1058087743 + .long 1059427869 + .long 1061799040 + .long 1065862217 + .long 1071413542 + .long 1084439708 + .long 1057128951 + .long 1058664893 + .long 1063675095 + .long 1076102863 + .long 1057655764 + .long 1067924853 + .long 1060439283 + .long 0 + .text + ALIGN16 +.globl ASM_NAME(dct64_real_x86_64) +ASM_NAME(dct64_real_x86_64): +#ifdef _WIN64 /* should save xmm6-15 */ + movq %rcx, ARG0 + subq $168, %rsp /* stack alignment + 10 xmm registers */ + movaps %xmm6, (%rsp) + movaps %xmm7, 16(%rsp) + movaps %xmm8, 32(%rsp) + movaps %xmm9, 48(%rsp) + movaps %xmm10, 64(%rsp) + movaps %xmm11, 80(%rsp) + movaps %xmm12, 96(%rsp) + movaps %xmm13, 112(%rsp) + movaps %xmm14, 128(%rsp) + movaps %xmm15, 144(%rsp) +#endif + + leaq ASM_NAME(costab_x86_64)(%rip), %rcx + + MOVUAPS (ARG2), %xmm15 + MOVUAPS 16(ARG2), %xmm14 + MOVUAPS 112(ARG2), %xmm0 + MOVUAPS 96(ARG2), %xmm1 + shufps $0x1b, %xmm0, %xmm0 + shufps $0x1b, %xmm1, %xmm1 + movaps %xmm15, %xmm8 + movaps %xmm14, %xmm9 + addps %xmm0, %xmm8 + addps %xmm1, %xmm9 + subps %xmm0, %xmm15 + subps %xmm1, %xmm14 + + MOVUAPS 32(ARG2), %xmm13 + MOVUAPS 48(ARG2), %xmm12 + MOVUAPS 80(ARG2), %xmm0 + MOVUAPS 64(ARG2), %xmm1 + shufps $0x1b, %xmm0, %xmm0 + shufps $0x1b, %xmm1, %xmm1 + movaps %xmm13, %xmm10 + movaps %xmm12, %xmm11 + addps %xmm0, %xmm10 + addps %xmm1, %xmm11 + subps %xmm0, %xmm13 + subps %xmm1, %xmm12 + + movaps (%rcx), %xmm0 + movaps 16(%rcx), %xmm1 + movaps 32(%rcx), %xmm2 + movaps 48(%rcx), %xmm3 + mulps %xmm0, %xmm15 + mulps %xmm1, %xmm14 + mulps %xmm2, %xmm13 + mulps %xmm3, %xmm12 + + movaps 64(%rcx), %xmm0 + movaps 80(%rcx), %xmm1 + + pshufd $0x1b, %xmm11, %xmm2 + pshufd $0x1b, %xmm10, %xmm3 + shufps $0x1b, %xmm13, %xmm13 + shufps $0x1b, %xmm12, %xmm12 + movaps %xmm8, %xmm11 + movaps %xmm9, %xmm10 + movaps %xmm14, %xmm4 + movaps %xmm15, %xmm5 + subps %xmm2, %xmm11 + subps %xmm3, %xmm10 + subps %xmm13, %xmm14 + subps %xmm12, %xmm15 + addps %xmm2, %xmm8 + addps %xmm3, %xmm9 + addps %xmm5, %xmm12 + addps %xmm4, %xmm13 + mulps %xmm0, %xmm11 + mulps %xmm1, %xmm10 + mulps %xmm1, %xmm14 + mulps %xmm0, %xmm15 + + movaps 96(%rcx), %xmm0 + + pshufd $0x1b, %xmm9, %xmm1 + pshufd $0x1b, %xmm13, %xmm2 + shufps $0x1b, %xmm10, %xmm10 + shufps $0x1b, %xmm14, %xmm14 + movaps %xmm8, %xmm9 + movaps %xmm12, %xmm13 + movaps %xmm11, %xmm3 + movaps %xmm15, %xmm4 + subps %xmm1, %xmm9 + subps %xmm2, %xmm13 + subps %xmm10, %xmm11 + subps %xmm14, %xmm15 + addps %xmm1, %xmm8 + addps %xmm2, %xmm12 + addps %xmm3, %xmm10 + addps %xmm4, %xmm14 + mulps %xmm0, %xmm9 + mulps %xmm0, %xmm13 + mulps %xmm0, %xmm11 + mulps %xmm0, %xmm15 + + movaps 112(%rcx), %xmm0 + movaps %xmm0, %xmm1 + movlhps %xmm1, %xmm1 + + movaps %xmm8, %xmm2 + movaps %xmm9, %xmm3 + shufps $0x44, %xmm10, %xmm2 + shufps $0xbb, %xmm11, %xmm9 + shufps $0xbb, %xmm10, %xmm8 + shufps $0x44, %xmm11, %xmm3 + movaps %xmm2, %xmm4 + movaps %xmm3, %xmm5 + subps %xmm8, %xmm2 + subps %xmm9, %xmm3 + addps %xmm4, %xmm8 + addps %xmm5, %xmm9 + mulps %xmm1, %xmm2 + mulps %xmm1, %xmm3 + movaps %xmm8, %xmm10 + movaps %xmm9, %xmm11 + shufps $0x14, %xmm2, %xmm8 + shufps $0xbe, %xmm2, %xmm10 + shufps $0x14, %xmm3, %xmm9 + shufps $0xbe, %xmm3, %xmm11 + + movaps %xmm12, %xmm2 + movaps %xmm13, %xmm3 + shufps $0x44, %xmm14, %xmm2 + shufps $0xbb, %xmm15, %xmm13 + shufps $0xbb, %xmm14, %xmm12 + shufps $0x44, %xmm15, %xmm3 + movaps %xmm2, %xmm4 + movaps %xmm3, %xmm5 + subps %xmm12, %xmm2 + subps %xmm13, %xmm3 + addps %xmm4, %xmm12 + addps %xmm5, %xmm13 + mulps %xmm1, %xmm2 + mulps %xmm1, %xmm3 + movaps %xmm12, %xmm14 + movaps %xmm13, %xmm15 + shufps $0x14, %xmm2, %xmm12 + shufps $0xbe, %xmm2, %xmm14 + shufps $0x14, %xmm3, %xmm13 + shufps $0xbe, %xmm3, %xmm15 + + shufps $0xaa, %xmm0, %xmm0 + pcmpeqd %xmm1, %xmm1 + pslld $31, %xmm1 + psllq $32, %xmm1 + xorps %xmm1, %xmm0 + + movaps %xmm8, %xmm1 + movaps %xmm10, %xmm2 + unpcklps %xmm9, %xmm8 + unpckhps %xmm9, %xmm1 + unpcklps %xmm11, %xmm10 + unpckhps %xmm11, %xmm2 + movaps %xmm8, %xmm3 + movaps %xmm10, %xmm4 + unpcklps %xmm1, %xmm8 + unpckhps %xmm1, %xmm3 + unpcklps %xmm2, %xmm10 + unpckhps %xmm2, %xmm4 + movaps %xmm8, %xmm1 + movaps %xmm10, %xmm2 + subps %xmm3, %xmm1 + subps %xmm4, %xmm2 + addps %xmm3, %xmm8 + addps %xmm4, %xmm10 + mulps %xmm0, %xmm1 + mulps %xmm0, %xmm2 + movaps %xmm8, %xmm9 + movaps %xmm10, %xmm11 + unpcklps %xmm1, %xmm8 + unpckhps %xmm1, %xmm9 + unpcklps %xmm2, %xmm10 + unpckhps %xmm2, %xmm11 + + movaps %xmm12, %xmm1 + movaps %xmm14, %xmm2 + unpcklps %xmm13, %xmm12 + unpckhps %xmm13, %xmm1 + unpcklps %xmm15, %xmm14 + unpckhps %xmm15, %xmm2 + movaps %xmm12, %xmm3 + movaps %xmm14, %xmm4 + unpcklps %xmm1, %xmm12 + unpckhps %xmm1, %xmm3 + unpcklps %xmm2, %xmm14 + unpckhps %xmm2, %xmm4 + movaps %xmm12, %xmm1 + movaps %xmm14, %xmm2 + subps %xmm3, %xmm1 + subps %xmm4, %xmm2 + addps %xmm3, %xmm12 + addps %xmm4, %xmm14 + mulps %xmm0, %xmm1 + mulps %xmm0, %xmm2 + movaps %xmm12, %xmm13 + movaps %xmm14, %xmm15 + unpcklps %xmm1, %xmm12 + unpckhps %xmm1, %xmm13 + unpcklps %xmm2, %xmm14 + unpckhps %xmm2, %xmm15 + + + xorps %xmm0, %xmm0 + xorps %xmm1, %xmm1 + shufpd $0x2, %xmm8, %xmm0 + shufpd $0x2, %xmm9, %xmm1 + psrlq $32, %xmm0 + psrlq $32, %xmm1 + addps %xmm0, %xmm8 + addps %xmm1, %xmm9 + + xorps %xmm0, %xmm0 + xorps %xmm1, %xmm1 + shufpd $0x2, %xmm10, %xmm0 + shufpd $0x2, %xmm11, %xmm1 + psrlq $32, %xmm0 + psrlq $32, %xmm1 + addps %xmm0, %xmm10 + addps %xmm1, %xmm11 + + xorps %xmm0, %xmm0 + xorps %xmm1, %xmm1 + shufpd $0x2, %xmm12, %xmm0 + shufpd $0x2, %xmm13, %xmm1 + psrlq $32, %xmm0 + psrlq $32, %xmm1 + addps %xmm0, %xmm12 + addps %xmm1, %xmm13 + + xorps %xmm0, %xmm0 + xorps %xmm1, %xmm1 + shufpd $0x2, %xmm14, %xmm0 + shufpd $0x2, %xmm15, %xmm1 + psrlq $32, %xmm0 + psrlq $32, %xmm1 + addps %xmm0, %xmm14 + addps %xmm1, %xmm15 + + pshufd $0x78, %xmm9, %xmm0 + pshufd $0x78, %xmm11, %xmm1 + pshufd $0x78, %xmm13, %xmm2 + pshufd $0x78, %xmm15, %xmm3 + psrldq $4, %xmm0 + psrldq $4, %xmm1 + psrldq $4, %xmm2 + psrldq $4, %xmm3 + addps %xmm0, %xmm9 + addps %xmm1, %xmm11 + addps %xmm2, %xmm13 + addps %xmm3, %xmm15 + + pshufd $0x78, %xmm10, %xmm0 + pshufd $0x78, %xmm14, %xmm1 + psrldq $4, %xmm0 + psrldq $4, %xmm1 + addps %xmm11, %xmm10 + addps %xmm15, %xmm14 + addps %xmm0, %xmm11 + addps %xmm1, %xmm15 + + + movss %xmm8, 1024(ARG0) + movss %xmm10, 896(ARG0) + movss %xmm9, 768(ARG0) + movss %xmm11, 640(ARG0) + movhlps %xmm8, %xmm0 + movhlps %xmm10, %xmm1 + movhlps %xmm9, %xmm2 + movhlps %xmm11, %xmm3 + movss %xmm0, 512(ARG0) + movss %xmm1, 384(ARG0) + movss %xmm2, 256(ARG0) + movss %xmm3, 128(ARG0) + + pshuflw $0xee, %xmm8, %xmm4 + pshuflw $0xee, %xmm10, %xmm5 + pshuflw $0xee, %xmm9, %xmm6 + pshuflw $0xee, %xmm11, %xmm7 + movss %xmm4, (ARG0) + movss %xmm4, (ARG1) + movss %xmm5, 128(ARG1) + movss %xmm6, 256(ARG1) + movss %xmm7, 384(ARG1) + + pshuflw $0xee, %xmm0, %xmm0 + pshuflw $0xee, %xmm1, %xmm1 + pshuflw $0xee, %xmm2, %xmm2 + pshuflw $0xee, %xmm3, %xmm3 + movss %xmm0, 512(ARG1) + movss %xmm1, 640(ARG1) + movss %xmm2, 768(ARG1) + movss %xmm3, 896(ARG1) + + pshufd $0x78, %xmm12, %xmm0 + movaps %xmm13, %xmm1 + psrldq $4, %xmm0 + + addps %xmm14, %xmm12 + addps %xmm15, %xmm13 + addps %xmm1, %xmm14 + addps %xmm0, %xmm15 + + movss %xmm12, 960(ARG0) + movss %xmm14, 832(ARG0) + movss %xmm13, 704(ARG0) + movss %xmm15, 576(ARG0) + movhlps %xmm12, %xmm0 + movhlps %xmm14, %xmm1 + movhlps %xmm13, %xmm2 + movhlps %xmm15, %xmm3 + movss %xmm0, 448(ARG0) + movss %xmm1, 320(ARG0) + movss %xmm2, 192(ARG0) + movss %xmm3, 64(ARG0) + + pshuflw $0xee, %xmm12, %xmm4 + pshuflw $0xee, %xmm14, %xmm5 + pshuflw $0xee, %xmm13, %xmm6 + pshuflw $0xee, %xmm15, %xmm7 + movss %xmm4, 64(ARG1) + movss %xmm5, 192(ARG1) + movss %xmm6, 320(ARG1) + movss %xmm7, 448(ARG1) + + pshuflw $0xee, %xmm0, %xmm0 + pshuflw $0xee, %xmm1, %xmm1 + pshuflw $0xee, %xmm2, %xmm2 + pshuflw $0xee, %xmm3, %xmm3 + movss %xmm0, 576(ARG1) + movss %xmm1, 704(ARG1) + movss %xmm2, 832(ARG1) + movss %xmm3, 960(ARG1) + +#ifdef _WIN64 + movaps (%rsp), %xmm6 + movaps 16(%rsp), %xmm7 + movaps 32(%rsp), %xmm8 + movaps 48(%rsp), %xmm9 + movaps 64(%rsp), %xmm10 + movaps 80(%rsp), %xmm11 + movaps 96(%rsp), %xmm12 + movaps 112(%rsp), %xmm13 + movaps 128(%rsp), %xmm14 + movaps 144(%rsp), %xmm15 + addq $168, %rsp +#endif + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/debug.h b/deps/mpg123/src/libmpg123/debug.h new file mode 100644 index 0000000..32d471c --- /dev/null +++ b/deps/mpg123/src/libmpg123/debug.h @@ -0,0 +1,171 @@ +/* + debug.h: + if DEBUG defined: debugging macro fprintf wrappers + else: macros defined to do nothing + That saves typing #ifdef DEBUG all the time and still preserves + lean code without debugging. + + public domain (or LGPL / GPL, if you like that more;-) + generated by debugdef.pl, what was + trivially written by Thomas Orgis +*/ + +#include "config.h" + +/* + I could do that with variadic macros available: + #define sdebug(me, s) fprintf(stderr, "[location] " s "\n") + #define debug(me, s, ...) fprintf(stderr, "[location] " s "}n", __VA_ARGS__) + + Variadic macros are a C99 feature... + Now just predefining stuff non-variadic for up to 15 arguments. + It's cumbersome to have them all with different names, though... +*/ + +#ifdef DEBUG +#include +#define debug(s) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__) +#define debug1(s, a) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a) +#define debug2(s, a, b) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b) +#define debug3(s, a, b, c) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c) +#define debug4(s, a, b, c, d) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d) +#define debug5(s, a, b, c, d, e) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e) +#define debug6(s, a, b, c, d, e, f) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f) +#define debug7(s, a, b, c, d, e, f, g) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f, g) +#define debug8(s, a, b, c, d, e, f, g, h) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f, g, h) +#define debug9(s, a, b, c, d, e, f, g, h, i) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i) +#define debug10(s, a, b, c, d, e, f, g, h, i, j) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j) +#define debug11(s, a, b, c, d, e, f, g, h, i, j, k) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k) +#define debug12(s, a, b, c, d, e, f, g, h, i, j, k, l) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l) +#define debug13(s, a, b, c, d, e, f, g, h, i, j, k, l, m) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m) +#define debug14(s, a, b, c, d, e, f, g, h, i, j, k, l, m, n) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m, n) +#define debug15(s, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) +#else +#define debug(s) +#define debug1(s, a) +#define debug2(s, a, b) +#define debug3(s, a, b, c) +#define debug4(s, a, b, c, d) +#define debug5(s, a, b, c, d, e) +#define debug6(s, a, b, c, d, e, f) +#define debug7(s, a, b, c, d, e, f, g) +#define debug8(s, a, b, c, d, e, f, g, h) +#define debug9(s, a, b, c, d, e, f, g, h, i) +#define debug10(s, a, b, c, d, e, f, g, h, i, j) +#define debug11(s, a, b, c, d, e, f, g, h, i, j, k) +#define debug12(s, a, b, c, d, e, f, g, h, i, j, k, l) +#define debug13(s, a, b, c, d, e, f, g, h, i, j, k, l, m) +#define debug14(s, a, b, c, d, e, f, g, h, i, j, k, l, m, n) +#define debug15(s, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) +#endif + +/* warning macros also here... */ +#ifndef NO_WARNING +#define warning(s) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__) +#define warning1(s, a) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a) +#define warning2(s, a, b) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b) +#define warning3(s, a, b, c) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c) +#define warning4(s, a, b, c, d) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d) +#define warning5(s, a, b, c, d, e) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e) +#define warning6(s, a, b, c, d, e, f) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f) +#define warning7(s, a, b, c, d, e, f, g) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f, g) +#define warning8(s, a, b, c, d, e, f, g, h) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f, g, h) +#define warning9(s, a, b, c, d, e, f, g, h, i) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i) +#define warning10(s, a, b, c, d, e, f, g, h, i, j) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j) +#define warning11(s, a, b, c, d, e, f, g, h, i, j, k) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k) +#define warning12(s, a, b, c, d, e, f, g, h, i, j, k, l) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l) +#define warning13(s, a, b, c, d, e, f, g, h, i, j, k, l, m) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m) +#define warning14(s, a, b, c, d, e, f, g, h, i, j, k, l, m, n) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m, n) +#define warning15(s, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) +#else +#define warning(s) +#define warning1(s, a) +#define warning2(s, a, b) +#define warning3(s, a, b, c) +#define warning4(s, a, b, c, d) +#define warning5(s, a, b, c, d, e) +#define warning6(s, a, b, c, d, e, f) +#define warning7(s, a, b, c, d, e, f, g) +#define warning8(s, a, b, c, d, e, f, g, h) +#define warning9(s, a, b, c, d, e, f, g, h, i) +#define warning10(s, a, b, c, d, e, f, g, h, i, j) +#define warning11(s, a, b, c, d, e, f, g, h, i, j, k) +#define warning12(s, a, b, c, d, e, f, g, h, i, j, k, l) +#define warning13(s, a, b, c, d, e, f, g, h, i, j, k, l, m) +#define warning14(s, a, b, c, d, e, f, g, h, i, j, k, l, m, n) +#define warning15(s, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) +#endif + +/* error macros also here... */ +#ifndef NO_ERRORMSG +#define error(s) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__) +#define error1(s, a) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a) +#define error2(s, a, b) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b) +#define error3(s, a, b, c) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c) +#define error4(s, a, b, c, d) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d) +#define error5(s, a, b, c, d, e) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e) +#define error6(s, a, b, c, d, e, f) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f) +#define error7(s, a, b, c, d, e, f, g) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f, g) +#define error8(s, a, b, c, d, e, f, g, h) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f, g, h) +#define error9(s, a, b, c, d, e, f, g, h, i) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i) +#define error10(s, a, b, c, d, e, f, g, h, i, j) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j) +#define error11(s, a, b, c, d, e, f, g, h, i, j, k) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k) +#define error12(s, a, b, c, d, e, f, g, h, i, j, k, l) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l) +#define error13(s, a, b, c, d, e, f, g, h, i, j, k, l, m) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m) +#define error14(s, a, b, c, d, e, f, g, h, i, j, k, l, m, n) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m, n) +#define error15(s, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) +#else +#define error(s) +#define error1(s, a) +#define error2(s, a, b) +#define error3(s, a, b, c) +#define error4(s, a, b, c, d) +#define error5(s, a, b, c, d, e) +#define error6(s, a, b, c, d, e, f) +#define error7(s, a, b, c, d, e, f, g) +#define error8(s, a, b, c, d, e, f, g, h) +#define error9(s, a, b, c, d, e, f, g, h, i) +#define error10(s, a, b, c, d, e, f, g, h, i, j) +#define error11(s, a, b, c, d, e, f, g, h, i, j, k) +#define error12(s, a, b, c, d, e, f, g, h, i, j, k, l) +#define error13(s, a, b, c, d, e, f, g, h, i, j, k, l, m) +#define error14(s, a, b, c, d, e, f, g, h, i, j, k, l, m, n) +#define error15(s, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) +#endif + +/* ereturn macros also here... */ +#ifndef NO_ERETURN +#define ereturn(rv, s) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__); return rv; }while(0) +#define ereturn1(rv, s, a) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a); return rv; }while(0) +#define ereturn2(rv, s, a, b) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b); return rv; }while(0) +#define ereturn3(rv, s, a, b, c) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c); return rv; }while(0) +#define ereturn4(rv, s, a, b, c, d) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d); return rv; }while(0) +#define ereturn5(rv, s, a, b, c, d, e) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e); return rv; }while(0) +#define ereturn6(rv, s, a, b, c, d, e, f) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f); return rv; }while(0) +#define ereturn7(rv, s, a, b, c, d, e, f, g) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f, g); return rv; }while(0) +#define ereturn8(rv, s, a, b, c, d, e, f, g, h) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f, g, h); return rv; }while(0) +#define ereturn9(rv, s, a, b, c, d, e, f, g, h, i) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i); return rv; }while(0) +#define ereturn10(rv, s, a, b, c, d, e, f, g, h, i, j) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j); return rv; }while(0) +#define ereturn11(rv, s, a, b, c, d, e, f, g, h, i, j, k) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k); return rv; }while(0) +#define ereturn12(rv, s, a, b, c, d, e, f, g, h, i, j, k, l) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l); return rv; }while(0) +#define ereturn13(rv, s, a, b, c, d, e, f, g, h, i, j, k, l, m) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m); return rv; }while(0) +#define ereturn14(rv, s, a, b, c, d, e, f, g, h, i, j, k, l, m, n) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m, n); return rv; }while(0) +#define ereturn15(rv, s, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o); return rv; }while(0) +#else +#define ereturn(rv, s) return rv +#define ereturn1(rv, s, a) return rv +#define ereturn2(rv, s, a, b) return rv +#define ereturn3(rv, s, a, b, c) return rv +#define ereturn4(rv, s, a, b, c, d) return rv +#define ereturn5(rv, s, a, b, c, d, e) return rv +#define ereturn6(rv, s, a, b, c, d, e, f) return rv +#define ereturn7(rv, s, a, b, c, d, e, f, g) return rv +#define ereturn8(rv, s, a, b, c, d, e, f, g, h) return rv +#define ereturn9(rv, s, a, b, c, d, e, f, g, h, i) return rv +#define ereturn10(rv, s, a, b, c, d, e, f, g, h, i, j) return rv +#define ereturn11(rv, s, a, b, c, d, e, f, g, h, i, j, k) return rv +#define ereturn12(rv, s, a, b, c, d, e, f, g, h, i, j, k, l) return rv +#define ereturn13(rv, s, a, b, c, d, e, f, g, h, i, j, k, l, m) return rv +#define ereturn14(rv, s, a, b, c, d, e, f, g, h, i, j, k, l, m, n) return rv +#define ereturn15(rv, s, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) return rv +#endif diff --git a/deps/mpg123/src/libmpg123/decode.h b/deps/mpg123/src/libmpg123/decode.h new file mode 100644 index 0000000..e2f167e --- /dev/null +++ b/deps/mpg123/src/libmpg123/decode.h @@ -0,0 +1,268 @@ +/* + decode.h: common definitions for decode functions + + This file is strongly tied with optimize.h concerning the synth functions. + Perhaps one should restructure that a bit. + + copyright 2007-8 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Thomas Orgis, taking WRITE_SAMPLE from decode.c +*/ +#ifndef MPG123_DECODE_H +#define MPG123_DECODE_H + +/* Selection of class of output routines for basic format. */ +#ifndef REAL_IS_FIXED +#define OUT_FORMATS 4 /* Basic output formats: 16bit, 8bit, real and s32 */ +#else +#define OUT_FORMATS 2 /* Only up to 16bit */ +#endif + +#define OUT_16 0 +#define OUT_8 1 +/* Those are defined but not supported for fixed point decoding! */ +#define OUT_REAL 2 /* Write a floating point sample (that is, one matching the internal real type). */ +#define OUT_S32 3 + +#ifdef NO_NTOM +#define NTOM_MAX 1 +#else +#define NTOM_MAX 8 /* maximum allowed factor for upsampling */ +#define NTOM_MAX_FREQ 96000 /* maximum frequency to upsample to / downsample from */ +#define NTOM_MUL (32768) +void ntom_set_ntom(mpg123_handle *fr, off_t num); +#endif + +/* Let's collect all possible synth functions here, for an overview. + If they are actually defined and used depends on preprocessor machinery. + See synth.c and optimize.h for that, also some special C and assembler files. */ + +#ifndef NO_16BIT +/* The signed-16bit-producing variants. */ +int synth_1to1 (real*, int, mpg123_handle*, int); +int synth_1to1_dither (real*, int, mpg123_handle*, int); +int synth_1to1_i386 (real*, int, mpg123_handle*, int); +int synth_1to1_i586 (real*, int, mpg123_handle*, int); +int synth_1to1_i586_dither(real*, int, mpg123_handle*, int); +int synth_1to1_mmx (real*, int, mpg123_handle*, int); +int synth_1to1_3dnow (real*, int, mpg123_handle*, int); +int synth_1to1_sse (real*, int, mpg123_handle*, int); +int synth_1to1_stereo_sse (real*, real*, mpg123_handle*); +int synth_1to1_3dnowext (real*, int, mpg123_handle*, int); +int synth_1to1_altivec (real*, int, mpg123_handle*, int); +int synth_1to1_stereo_altivec(real*, real*, mpg123_handle*); +int synth_1to1_x86_64 (real*, int, mpg123_handle*, int); +int synth_1to1_stereo_x86_64(real*, real*, mpg123_handle*); +int synth_1to1_arm (real*, int, mpg123_handle*, int); +int synth_1to1_neon (real*, int, mpg123_handle*, int); +int synth_1to1_stereo_neon(real*, real*, mpg123_handle*); +/* This is different, special usage in layer3.c only. + Hence, the name... and now forget about it. + Never use it outside that special portion of code inside layer3.c! */ +int absynth_1to1_i486(real*, int, mpg123_handle*, int); +/* These mono/stereo converters use one of the above for the grunt work. */ +int synth_1to1_mono (real*, mpg123_handle*); +int synth_1to1_m2s(real*, mpg123_handle*); + +/* Sample rate decimation comes in less flavours. */ +#ifndef NO_DOWNSAMPLE +int synth_2to1 (real*, int, mpg123_handle*, int); +int synth_2to1_dither (real*, int, mpg123_handle*, int); +int synth_2to1_i386 (real*, int, mpg123_handle*, int); +int synth_2to1_mono (real*, mpg123_handle*); +int synth_2to1_m2s(real*, mpg123_handle*); +int synth_4to1 (real *,int, mpg123_handle*, int); +int synth_4to1_dither (real *,int, mpg123_handle*, int); +int synth_4to1_i386 (real*, int, mpg123_handle*, int); +int synth_4to1_mono (real*, mpg123_handle*); +int synth_4to1_m2s(real*, mpg123_handle*); +#endif +#ifndef NO_NTOM +/* NtoM is really just one implementation. */ +int synth_ntom (real *,int, mpg123_handle*, int); +int synth_ntom_mono (real *, mpg123_handle *); +int synth_ntom_m2s (real *, mpg123_handle *); +#endif +#endif + +#ifndef NO_8BIT +/* The 8bit-producing variants. */ +/* There are direct 8-bit synths and wrappers over a possibly optimized 16bit one. */ +int synth_1to1_8bit (real*, int, mpg123_handle*, int); +int synth_1to1_8bit_i386 (real*, int, mpg123_handle*, int); +#ifndef NO_16BIT +int synth_1to1_8bit_wrap (real*, int, mpg123_handle*, int); +int synth_1to1_8bit_mono (real*, mpg123_handle*); +#endif +int synth_1to1_8bit_m2s(real*, mpg123_handle*); +#ifndef NO_16BIT +int synth_1to1_8bit_wrap_mono (real*, mpg123_handle*); +int synth_1to1_8bit_wrap_m2s(real*, mpg123_handle*); +#endif +#ifndef NO_DOWNSAMPLE +int synth_2to1_8bit (real*, int, mpg123_handle*, int); +int synth_2to1_8bit_i386 (real*, int, mpg123_handle*, int); +int synth_2to1_8bit_mono (real*, mpg123_handle*); +int synth_2to1_8bit_m2s(real*, mpg123_handle*); +int synth_4to1_8bit (real*, int, mpg123_handle*, int); +int synth_4to1_8bit_i386 (real*, int, mpg123_handle*, int); +int synth_4to1_8bit_mono (real*, mpg123_handle*); +int synth_4to1_8bit_m2s(real*, mpg123_handle*); +#endif +#ifndef NO_NTOM +int synth_ntom_8bit (real*, int, mpg123_handle*, int); +int synth_ntom_8bit_mono (real*, mpg123_handle*); +int synth_ntom_8bit_m2s(real*, mpg123_handle*); +#endif +#endif + +#ifndef REAL_IS_FIXED + +#ifndef NO_REAL +/* The real-producing variants. */ +int synth_1to1_real (real*, int, mpg123_handle*, int); +int synth_1to1_real_i386 (real*, int, mpg123_handle*, int); +int synth_1to1_real_sse (real*, int, mpg123_handle*, int); +int synth_1to1_real_stereo_sse (real*, real*, mpg123_handle*); +int synth_1to1_real_x86_64 (real*, int, mpg123_handle*, int); +int synth_1to1_real_stereo_x86_64(real*, real*, mpg123_handle*); +int synth_1to1_real_altivec (real*, int, mpg123_handle*, int); +int synth_1to1_real_stereo_altivec(real*, real*, mpg123_handle*); +int synth_1to1_real_neon (real*, int, mpg123_handle*, int); +int synth_1to1_real_stereo_neon(real*, real*, mpg123_handle*); +int synth_1to1_real_mono (real*, mpg123_handle*); +int synth_1to1_real_m2s(real*, mpg123_handle*); +#ifndef NO_DOWNSAMPLE +int synth_2to1_real (real*, int, mpg123_handle*, int); +int synth_2to1_real_i386 (real*, int, mpg123_handle*, int); +int synth_2to1_real_mono (real*, mpg123_handle*); +int synth_2to1_real_m2s(real*, mpg123_handle*); +int synth_4to1_real (real*, int, mpg123_handle*, int); +int synth_4to1_real_i386 (real*, int, mpg123_handle*, int); +int synth_4to1_real_mono (real*, mpg123_handle*); +int synth_4to1_real_m2s(real*, mpg123_handle*); +#endif +#ifndef NO_NTOM +int synth_ntom_real (real*, int, mpg123_handle*, int); +int synth_ntom_real_mono (real*, mpg123_handle*); +int synth_ntom_real_m2s(real*, mpg123_handle*); +#endif +#endif + +#ifndef NO_32BIT +/* 32bit integer */ +int synth_1to1_s32 (real*, int, mpg123_handle*, int); +int synth_1to1_s32_i386 (real*, int, mpg123_handle*, int); +int synth_1to1_s32_sse (real*, int, mpg123_handle*, int); +int synth_1to1_s32_stereo_sse (real*, real*, mpg123_handle*); +int synth_1to1_s32_x86_64 (real*, int, mpg123_handle*, int); +int synth_1to1_s32_stereo_x86_64(real*, real*, mpg123_handle*); +int synth_1to1_s32_altivec (real*, int, mpg123_handle*, int); +int synth_1to1_s32_stereo_altivec(real*, real*, mpg123_handle*); +int synth_1to1_s32_neon (real*, int, mpg123_handle*, int); +int synth_1to1_s32_stereo_neon(real*, real*, mpg123_handle*); +int synth_1to1_s32_mono (real*, mpg123_handle*); +int synth_1to1_s32_m2s(real*, mpg123_handle*); +#ifndef NO_DOWNSAMPLE +int synth_2to1_s32 (real*, int, mpg123_handle*, int); +int synth_2to1_s32_i386 (real*, int, mpg123_handle*, int); +int synth_2to1_s32_mono (real*, mpg123_handle*); +int synth_2to1_s32_m2s(real*, mpg123_handle*); +int synth_4to1_s32 (real*, int, mpg123_handle*, int); +int synth_4to1_s32_i386 (real*, int, mpg123_handle*, int); +int synth_4to1_s32_mono (real*, mpg123_handle*); +int synth_4to1_s32_m2s(real*, mpg123_handle*); +#endif +#ifndef NO_NTOM +int synth_ntom_s32 (real*, int, mpg123_handle*, int); +int synth_ntom_s32_mono (real*, mpg123_handle*); +int synth_ntom_s32_m2s(real*, mpg123_handle*); +#endif +#endif + +#endif /* FIXED */ + + +/* Inside these synth functions, some dct64 variants may be used. + The special optimized ones that only appear in assembler code are not mentioned here. + And, generally, these functions are only employed in a matching synth function. */ +void dct64 (real *,real *,real *); +void dct64_i386 (real *,real *,real *); +void dct64_altivec(real *,real *,real *); +void dct64_i486(int*, int* , real*); /* Yeah, of no use outside of synth_i486.c .*/ + +/* This is used by the layer 3 decoder, one generic function and 3DNow variants. */ +void dct36 (real *,real *,real *,real *,real *); +void dct36_3dnow (real *,real *,real *,real *,real *); +void dct36_3dnowext(real *,real *,real *,real *,real *); + +/* Tools for NtoM resampling synth, defined in ntom.c . */ +int synth_ntom_set_step(mpg123_handle *fr); /* prepare ntom decoding */ +unsigned long ntom_val(mpg123_handle *fr, off_t frame); /* compute ntom_val for frame offset */ +/* Frame and sample offsets. */ +#ifndef NO_NTOM +/* + Outsamples of _this_ frame. + To be exact: The samples to be expected from the next frame decode (using the current ntom_val). When you already decoded _this_ frame, this is the number of samples to be expected from the next one. +*/ +off_t ntom_frame_outsamples(mpg123_handle *fr); +/* Total out/insample offset. */ +off_t ntom_frmouts(mpg123_handle *fr, off_t frame); +off_t ntom_ins2outs(mpg123_handle *fr, off_t ins); +off_t ntom_frameoff(mpg123_handle *fr, off_t soff); +#endif + +/* Initialization of any static data that majy be needed at runtime. + Make sure you call these once before it is too late. */ +#ifndef NO_LAYER3 +void init_layer3(void); +real init_layer3_gainpow2(mpg123_handle *fr, int i); +void init_layer3_stuff(mpg123_handle *fr, real (*gainpow2)(mpg123_handle *fr, int i)); +#endif +#ifndef NO_LAYER12 +void init_layer12(void); +real* init_layer12_table(mpg123_handle *fr, real *table, int m); +void init_layer12_stuff(mpg123_handle *fr, real* (*init_table)(mpg123_handle *fr, real *table, int m)); +#endif + +void prepare_decode_tables(void); + +extern real *pnts[5]; /* tabinit provides, dct64 needs */ + +/* Runtime (re)init functions; needed more often. */ +void make_decode_tables(mpg123_handle *fr); /* For every volume change. */ +/* Stuff needed after updating synth setup (see set_synth_functions()). */ + +#ifdef OPT_MMXORSSE +/* Special treatment for mmx-like decoders, these functions go into the slots below. */ +void make_decode_tables_mmx(mpg123_handle *fr); +#ifndef NO_LAYER3 +real init_layer3_gainpow2_mmx(mpg123_handle *fr, int i); +#endif +#ifndef NO_LAYER12 +real* init_layer12_table_mmx(mpg123_handle *fr, real *table, int m); +#endif +#endif + +#ifndef NO_8BIT +/* Needed when switching to 8bit output. */ +int make_conv16to8_table(mpg123_handle *fr); +#endif + +/* These are the actual workers. + They operate on the parsed frame data and handle decompression to audio samples. + The synth functions defined above are called from inside the layer handlers. */ + +#ifndef NO_LAYER3 +int do_layer3(mpg123_handle *fr); +#endif +#ifndef NO_LAYER2 +int do_layer2(mpg123_handle *fr); +#endif +#ifndef NO_LAYER1 +int do_layer1(mpg123_handle *fr); +#endif +/* There's an 3DNow counterpart in asm. */ +void do_equalizer(real *bandPtr,int channel, real equalizer[2][32]); + +#endif diff --git a/deps/mpg123/src/libmpg123/dither.c b/deps/mpg123/src/libmpg123/dither.c new file mode 100644 index 0000000..30dbdd1 --- /dev/null +++ b/deps/mpg123/src/libmpg123/dither.c @@ -0,0 +1,119 @@ +/* + dither: Generate shaped noise for dithering + + copyright 2009 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "config.h" +#include "compat.h" +#include "dither.h" + +static const uint32_t init_seed = 2463534242UL; + +#define LAP 100 + +/* + xorshift random number generator, with output scaling to [-0.5, 0.5] + This is the white noise... + See http://www.jstatsoft.org/v08/i14/paper on XOR shift random number generators. +*/ +static float rand_xorshift32(uint32_t *seed) +{ + union + { + uint32_t i; + float f; + } fi; + + fi.i = *seed; + fi.i ^= (fi.i<<13); + fi.i ^= (fi.i>>17); + fi.i ^= (fi.i<<5); + *seed = fi.i; + + /* scale the number to [-0.5, 0.5] */ +#ifdef IEEE_FLOAT + fi.i = (fi.i>>9)|0x3f800000; + fi.f -= 1.5f; +#else + fi.f = (double)fi.i / 4294967295.0; + fi.f -= 0.5f; +#endif + return fi.f; +} + +static void white_noise(float *table, size_t count) +{ + size_t i; + uint32_t seed = init_seed; + + for(i=0; i 2*LAP ? LAP : count/2; + + float input_noise; + float xv[9], yv[9]; + + for(i=0;i<9;i++) + { + xv[i] = yv[i] = 0.0f; + } + + for(i=0;i=lap) table[i-lap] = yv[8] * 3.0f; + } +} + +void mpg123_noise(float* table, size_t count, enum mpg123_noise_type noisetype) +{ + switch(noisetype) + { + case mpg123_white_noise: white_noise(table, count); break; + case mpg123_tpdf_noise: tpdf_noise(table, count); break; + case mpg123_highpass_tpdf_noise: + highpass_tpdf_noise(table, count); + break; + } +} + +/* Generate white noise and shape it with a high pass filter. */ +void dither_table_init(float *dithertable) +{ + highpass_tpdf_noise(dithertable, DITHERSIZE); +} diff --git a/deps/mpg123/src/libmpg123/dither.h b/deps/mpg123/src/libmpg123/dither.h new file mode 100644 index 0000000..6a6cb3e --- /dev/null +++ b/deps/mpg123/src/libmpg123/dither.h @@ -0,0 +1,23 @@ +/* + dither: Generate noise for dithering / noise shaping. + + copyright 2009 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#ifndef MPG123_DITHER_H +#define MPG123_DITHER_H + +#define DITHERSIZE 65536 +enum mpg123_noise_type +{ + mpg123_white_noise = 0 + ,mpg123_tpdf_noise + ,mpg123_highpass_tpdf_noise +}; + +void mpg123_noise(float* table, size_t count, enum mpg123_noise_type noisetype); +void dither_table_init(float *dithertable); + +#endif diff --git a/deps/mpg123/src/libmpg123/equalizer.c b/deps/mpg123/src/libmpg123/equalizer.c new file mode 100644 index 0000000..bc5d5d9 --- /dev/null +++ b/deps/mpg123/src/libmpg123/equalizer.c @@ -0,0 +1,17 @@ +/* + equalizer.c: equalizer settings + + copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Michael Hipp +*/ + + +#include "mpg123lib_intern.h" + +void do_equalizer(real *bandPtr,int channel, real equalizer[2][32]) +{ + int i; + for(i=0;i<32;i++) + bandPtr[i] = REAL_MUL(bandPtr[i], equalizer[channel][i]); +} diff --git a/deps/mpg123/src/libmpg123/equalizer_3dnow.S b/deps/mpg123/src/libmpg123/equalizer_3dnow.S new file mode 100644 index 0000000..471a0ed --- /dev/null +++ b/deps/mpg123/src/libmpg123/equalizer_3dnow.S @@ -0,0 +1,70 @@ +/* + equalizer_3dnow: 3DNow! optimized do_equalizer() + + copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by KIMURA Takuhiro +*/ + +#include "mangle.h" + +.text + ALIGN4 +.globl ASM_NAME(do_equalizer_3dnow) +/* .type ASM_NAME(do_equalizer_3dnow),@function */ +/* void do_equalizer(real *bandPtr,int channel, real equalizer[2][32]); */ +ASM_NAME(do_equalizer_3dnow): + pushl %esi + pushl %ebx + /* bandPtr */ + movl 12(%esp),%ebx + /* channel */ + movl 16(%esp),%ecx + xorl %edx,%edx + /* equalizer */ + movl 20(%esp),%esi + sall $7,%ecx + ALIGN4 +.L9: + movq (%ebx,%edx),%mm0 + pfmul (%esi,%ecx),%mm0 + + movq 8(%ebx,%edx),%mm1 + pfmul 8(%esi,%ecx),%mm1 + movq %mm0,(%ebx,%edx) + + movq 16(%ebx,%edx),%mm0 + pfmul 16(%esi,%ecx),%mm0 + movq %mm1,8(%ebx,%edx) + + movq 24(%ebx,%edx),%mm1 + pfmul 24(%esi,%ecx),%mm1 + movq %mm0,16(%ebx,%edx) + + movq 32(%ebx,%edx),%mm0 + pfmul 32(%esi,%ecx),%mm0 + movq %mm1,24(%ebx,%edx) + + movq 40(%ebx,%edx),%mm1 + pfmul 40(%esi,%ecx),%mm1 + movq %mm0,32(%ebx,%edx) + + movq 48(%ebx,%edx),%mm0 + pfmul 48(%esi,%ecx),%mm0 + movq %mm1,40(%ebx,%edx) + + movq 56(%ebx,%edx),%mm1 + pfmul 56(%esi,%ecx),%mm1 + movq %mm0,48(%ebx,%edx) + movq %mm1,56(%ebx,%edx) + + addl $64,%edx + addl $32,%ecx + cmpl $124,%edx + jle .L9 + ALIGN4 + popl %ebx + popl %esi + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/feature.c b/deps/mpg123/src/libmpg123/feature.c new file mode 100644 index 0000000..1972388 --- /dev/null +++ b/deps/mpg123/src/libmpg123/feature.c @@ -0,0 +1,106 @@ +#include "mpg123lib_intern.h" + +int mpg123_feature(const enum mpg123_feature_set key) +{ + switch(key) + { + case MPG123_FEATURE_ABI_UTF8OPEN: +#ifdef WANT_WIN32_UNICODE + return 1; +#else + return 0; +#endif /* WANT_WIN32_UNICODE */ + + case MPG123_FEATURE_OUTPUT_8BIT: +#ifdef NO_8BIT + return 0; +#else + return 1; +#endif /* mpg123_output_8bit */ + + case MPG123_FEATURE_OUTPUT_16BIT: +#ifdef NO_16BIT + return 0; +#else + return 1; +#endif /* mpg123_output_16bit */ + + case MPG123_FEATURE_OUTPUT_32BIT: +#ifdef NO_32BIT + return 0; +#else + return 1; +#endif /* mpg123_output_32bit */ + + case MPG123_FEATURE_PARSE_ID3V2: +#ifdef NO_ID3V2 + return 0; +#else + return 1; +#endif /* NO_ID3V2 */ + + case MPG123_FEATURE_DECODE_LAYER1: +#ifdef NO_LAYER1 + return 0; +#else + return 1; +#endif /* NO_LAYER1 */ + + case MPG123_FEATURE_DECODE_LAYER2: +#ifdef NO_LAYER2 + return 0; +#else + return 1; +#endif /* NO_LAYER2 */ + + case MPG123_FEATURE_DECODE_LAYER3: +#ifdef NO_LAYER3 + return 0; +#else + return 1; +#endif /* NO_LAYER3 */ + + case MPG123_FEATURE_DECODE_ACCURATE: +#ifdef ACCURATE_ROUNDING + return 1; +#else + return 0; +#endif /* ACCURATE_ROUNDING */ + + case MPG123_FEATURE_DECODE_DOWNSAMPLE: +#ifdef NO_DOWNSAMPLE + return 0; +#else + return 1; +#endif /* NO_DOWNSAMPLE */ + + case MPG123_FEATURE_DECODE_NTOM: +#ifdef NO_NTOM + return 0; +#else + return 1; +#endif /* NO_NTOM */ + + case MPG123_FEATURE_PARSE_ICY: +#ifdef NO_ICY + return 0; +#else + return 1; +#endif /* NO_ICY */ + + case MPG123_FEATURE_INDEX: +#ifdef FRAME_INDEX + return 1; +#else + return 0; +#endif /* FRAME_INDEX */ + case MPG123_FEATURE_TIMEOUT_READ: +#ifdef TIMEOUT_READ + return 1; +#else + return 0; +#endif + + default: return 0; + } +} diff --git a/deps/mpg123/src/libmpg123/format.c b/deps/mpg123/src/libmpg123/format.c new file mode 100644 index 0000000..1f4d49e --- /dev/null +++ b/deps/mpg123/src/libmpg123/format.c @@ -0,0 +1,521 @@ +/* + format:routines to deal with audio (output) format + + copyright 2008-9 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Thomas Orgis, starting with parts of the old audio.c, with only faintly manage to show now +*/ + +#include "mpg123lib_intern.h" +#include "debug.h" + +/* static int chans[NUM_CHANNELS] = { 1 , 2 }; */ +static const long my_rates[MPG123_RATES] = /* only the standard rates */ +{ + 8000, 11025, 12000, + 16000, 22050, 24000, + 32000, 44100, 48000, +}; + +static const int my_encodings[MPG123_ENCODINGS] = +{ + MPG123_ENC_SIGNED_16, + MPG123_ENC_UNSIGNED_16, + MPG123_ENC_SIGNED_32, + MPG123_ENC_UNSIGNED_32, + MPG123_ENC_SIGNED_24, + MPG123_ENC_UNSIGNED_24, + /* Floating point range, see below. */ + MPG123_ENC_FLOAT_32, + MPG123_ENC_FLOAT_64, + /* 8 bit range, see below. */ + MPG123_ENC_SIGNED_8, + MPG123_ENC_UNSIGNED_8, + MPG123_ENC_ULAW_8, + MPG123_ENC_ALAW_8 +}; + +/* Make that match the above table. + And yes, I still don't like this kludgy stuff. */ +/* range[0] <= i < range[1] for forced floating point */ +static const int enc_float_range[2] = { 6, 8 }; +/* same for 8 bit encodings */ +static const int enc_8bit_range[2] = { 8, 12 }; + +/* Only one type of float is supported. */ +# ifdef REAL_IS_FLOAT +# define MPG123_FLOAT_ENC MPG123_ENC_FLOAT_32 +# else +# define MPG123_FLOAT_ENC MPG123_ENC_FLOAT_64 +# endif + +/* The list of actually possible encodings. */ +static const int good_encodings[] = +{ +#ifndef NO_16BIT + MPG123_ENC_SIGNED_16, + MPG123_ENC_UNSIGNED_16, +#endif +#ifndef NO_32BIT + MPG123_ENC_SIGNED_32, + MPG123_ENC_UNSIGNED_32, + MPG123_ENC_SIGNED_24, + MPG123_ENC_UNSIGNED_24, +#endif +#ifndef NO_REAL + MPG123_FLOAT_ENC, +#endif +#ifndef NO_8BIT + MPG123_ENC_SIGNED_8, + MPG123_ENC_UNSIGNED_8, + MPG123_ENC_ULAW_8, + MPG123_ENC_ALAW_8 +#endif +}; + +/* Check if encoding is a valid one in this build. + ...lazy programming: linear search. */ +static int good_enc(const int enc) +{ + size_t i; + for(i=0; iforce_rate != 0 && mp->force_rate == r) return MPG123_RATES; +#endif + + return -1; +} + +static int enc2num(int encoding) +{ + int i; + for(i=0;ichannels-1; + int rn = rate2num(&fr->p, nf->rate); + if(rn >= 0) for(i=f0;ip.audio_caps[c][rn][i]) + { + nf->encoding = my_encodings[i]; + return 1; + } + } + return 0; +} + +static int freq_fit(mpg123_handle *fr, struct audioformat *nf, int f0, int f2) +{ + nf->rate = frame_freq(fr)>>fr->p.down_sample; + if(cap_fit(fr,nf,f0,f2)) return 1; + if(fr->p.flags & MPG123_AUTO_RESAMPLE) + { + nf->rate>>=1; + if(cap_fit(fr,nf,f0,f2)) return 1; + nf->rate>>=1; + if(cap_fit(fr,nf,f0,f2)) return 1; + } +#ifndef NO_NTOM + /* If nothing worked, try the other rates, only without constrains from user. + In case you didn't guess: We enable flexible resampling if we find a working rate. */ + if( fr->p.flags & MPG123_AUTO_RESAMPLE && + !fr->p.force_rate && fr->p.down_sample == 0) + { + int i; + int c = nf->channels-1; + int rn = rate2num(&fr->p, frame_freq(fr)); + int rrn; + if(rn < 0) return 0; + /* Try higher rates first. */ + for(i=f0;ip.audio_caps[c][rrn][i]) + { + nf->rate = my_rates[rrn]; + nf->encoding = my_encodings[i]; + return 1; + } + /* Then lower rates. */ + for(i=f0;i=0; --rrn) + if(fr->p.audio_caps[c][rrn][i]) + { + nf->rate = my_rates[rrn]; + nf->encoding = my_encodings[i]; + return 1; + } + } +#endif + + return 0; +} + +/* match constraints against supported audio formats, store possible setup in frame + return: -1: error; 0: no format change; 1: format change */ +int frame_output_format(mpg123_handle *fr) +{ + struct audioformat nf; + int f0=0; + int f2=MPG123_ENCODINGS; /* Omit the 32bit and float encodings. */ + mpg123_pars *p = &fr->p; + /* initialize new format, encoding comes later */ + nf.channels = fr->stereo; + + /* All this forcing should be removed in favour of the capabilities table... */ + if(p->flags & MPG123_FORCE_8BIT) + { + f0 = enc_8bit_range[0]; + f2 = enc_8bit_range[1]; + } + if(p->flags & MPG123_FORCE_FLOAT) + { + f0 = enc_float_range[0]; + f2 = enc_float_range[1]; + } + + /* force stereo is stronger */ + if(p->flags & MPG123_FORCE_MONO) nf.channels = 1; + if(p->flags & MPG123_FORCE_STEREO) nf.channels = 2; + +#ifndef NO_NTOM + if(p->force_rate) + { + nf.rate = p->force_rate; + if(cap_fit(fr,&nf,f0,2)) goto end; /* 16bit encodings */ + if(cap_fit(fr,&nf,f0<=2 ? 2 : f0,f2)) goto end; /* 8bit encodings */ + + /* try again with different stereoness */ + if(nf.channels == 2 && !(p->flags & MPG123_FORCE_STEREO)) nf.channels = 1; + else if(nf.channels == 1 && !(p->flags & MPG123_FORCE_MONO)) nf.channels = 2; + + if(cap_fit(fr,&nf,f0,2)) goto end; /* 16bit encodings */ + if(cap_fit(fr,&nf,f0<=2 ? 2 : f0,f2)) goto end; /* 8bit encodings */ + + if(NOQUIET) + error3( "Unable to set up output format! Constraints: %s%s%liHz.", + ( p->flags & MPG123_FORCE_STEREO ? "stereo, " : + (p->flags & MPG123_FORCE_MONO ? "mono, " : "") ), + (p->flags & MPG123_FORCE_8BIT ? "8bit, " : ""), + p->force_rate ); +/* if(NOQUIET && p->verbose <= 1) print_capabilities(fr); */ + + fr->err = MPG123_BAD_OUTFORMAT; + return -1; + } +#endif + + if(freq_fit(fr, &nf, f0, 2)) goto end; /* try rates with 16bit */ + if(freq_fit(fr, &nf, f0<=2 ? 2 : f0, f2)) goto end; /* ... 8bit */ + + /* try again with different stereoness */ + if(nf.channels == 2 && !(p->flags & MPG123_FORCE_STEREO)) nf.channels = 1; + else if(nf.channels == 1 && !(p->flags & MPG123_FORCE_MONO)) nf.channels = 2; + + if(freq_fit(fr, &nf, f0, 2)) goto end; /* try rates with 16bit */ + if(freq_fit(fr, &nf, f0<=2 ? 2 : f0, f2)) goto end; /* ... 8bit */ + + /* Here is the _bad_ end. */ + if(NOQUIET) + { + error5( "Unable to set up output format! Constraints: %s%s%li, %li or %liHz.", + ( p->flags & MPG123_FORCE_STEREO ? "stereo, " : + (p->flags & MPG123_FORCE_MONO ? "mono, " : "") ), + (p->flags & MPG123_FORCE_8BIT ? "8bit, " : ""), + frame_freq(fr), frame_freq(fr)>>1, frame_freq(fr)>>2 ); + } +/* if(NOQUIET && p->verbose <= 1) print_capabilities(fr); */ + + fr->err = MPG123_BAD_OUTFORMAT; + return -1; + +end: /* Here is the _good_ end. */ + /* we had a successful match, now see if there's a change */ + if(nf.rate == fr->af.rate && nf.channels == fr->af.channels && nf.encoding == fr->af.encoding) + { + debug2("Old format with %i channels, and FORCE_MONO=%li", nf.channels, p->flags & MPG123_FORCE_MONO); + return 0; /* the same format as before */ + } + else /* a new format */ + { + debug1("New format with %i channels!", nf.channels); + fr->af.rate = nf.rate; + fr->af.channels = nf.channels; + fr->af.encoding = nf.encoding; + /* Cache the size of one sample in bytes, for ease of use. */ + fr->af.encsize = mpg123_encsize(fr->af.encoding); + if(fr->af.encsize < 1) + { + if(NOQUIET) error1("Some unknown encoding??? (%i)", fr->af.encoding); + + fr->err = MPG123_BAD_OUTFORMAT; + return -1; + } + return 1; + } +} + +int attribute_align_arg mpg123_format_none(mpg123_handle *mh) +{ + int r; + if(mh == NULL) return MPG123_ERR; + + r = mpg123_fmt_none(&mh->p); + if(r != MPG123_OK){ mh->err = r; r = MPG123_ERR; } + + return r; +} + +int attribute_align_arg mpg123_fmt_none(mpg123_pars *mp) +{ + if(mp == NULL) return MPG123_BAD_PARS; + + if(PVERB(mp,3)) fprintf(stderr, "Note: Disabling all formats.\n"); + + memset(mp->audio_caps,0,sizeof(mp->audio_caps)); + return MPG123_OK; +} + +int attribute_align_arg mpg123_format_all(mpg123_handle *mh) +{ + int r; + if(mh == NULL) return MPG123_ERR; + + r = mpg123_fmt_all(&mh->p); + if(r != MPG123_OK){ mh->err = r; r = MPG123_ERR; } + + return r; +} + +int attribute_align_arg mpg123_fmt_all(mpg123_pars *mp) +{ + size_t rate, ch, enc; + if(mp == NULL) return MPG123_BAD_PARS; + + if(PVERB(mp,3)) fprintf(stderr, "Note: Enabling all formats.\n"); + + for(ch=0; ch < NUM_CHANNELS; ++ch) + for(rate=0; rate < MPG123_RATES+1; ++rate) + for(enc=0; enc < MPG123_ENCODINGS; ++enc) + mp->audio_caps[ch][rate][enc] = good_enc(my_encodings[enc]) ? 1 : 0; + + return MPG123_OK; +} + +int attribute_align_arg mpg123_format(mpg123_handle *mh, long rate, int channels, int encodings) +{ + int r; + if(mh == NULL) return MPG123_ERR; + r = mpg123_fmt(&mh->p, rate, channels, encodings); + if(r != MPG123_OK){ mh->err = r; r = MPG123_ERR; } + + return r; +} + +int attribute_align_arg mpg123_fmt(mpg123_pars *mp, long rate, int channels, int encodings) +{ + int ie, ic, ratei; + int ch[2] = {0, 1}; + if(mp == NULL) return MPG123_BAD_PARS; + if(!(channels & (MPG123_MONO|MPG123_STEREO))) return MPG123_BAD_CHANNEL; + + if(PVERB(mp,3)) fprintf(stderr, "Note: Want to enable format %li/%i for encodings 0x%x.\n", rate, channels, encodings); + + if(!(channels & MPG123_STEREO)) ch[1] = 0; /* {0,0} */ + else if(!(channels & MPG123_MONO)) ch[0] = 1; /* {1,1} */ + ratei = rate2num(mp, rate); + if(ratei < 0) return MPG123_BAD_RATE; + + /* now match the encodings */ + for(ic = 0; ic < 2; ++ic) + { + for(ie = 0; ie < MPG123_ENCODINGS; ++ie) + if(good_enc(my_encodings[ie]) && ((my_encodings[ie] & encodings) == my_encodings[ie])) + mp->audio_caps[ch[ic]][ratei][ie] = 1; + + if(ch[0] == ch[1]) break; /* no need to do it again */ + } + + return MPG123_OK; +} + +int attribute_align_arg mpg123_format_support(mpg123_handle *mh, long rate, int encoding) +{ + if(mh == NULL) return 0; + else return mpg123_fmt_support(&mh->p, rate, encoding); +} + +int attribute_align_arg mpg123_fmt_support(mpg123_pars *mp, long rate, int encoding) +{ + int ch = 0; + int ratei, enci; + ratei = rate2num(mp, rate); + enci = enc2num(encoding); + if(mp == NULL || ratei < 0 || enci < 0) return 0; + if(mp->audio_caps[0][ratei][enci]) ch |= MPG123_MONO; + if(mp->audio_caps[1][ratei][enci]) ch |= MPG123_STEREO; + return ch; +} + +/* Call this one to ensure that any valid format will be something different than this. */ +void invalidate_format(struct audioformat *af) +{ + af->encoding = 0; + af->rate = 0; + af->channels = 0; +} + +/* Consider 24bit output needing 32bit output as temporary storage. */ +off_t samples_to_storage(mpg123_handle *fr, off_t s) +{ + if(fr->af.encoding & MPG123_ENC_24) + return s*4*fr->af.channels; /* 4 bytes per sample */ + else + return samples_to_bytes(fr, s); +} + +/* take into account: channels, bytes per sample -- NOT resampling!*/ +off_t samples_to_bytes(mpg123_handle *fr , off_t s) +{ + return s * fr->af.encsize * fr->af.channels; +} + +off_t bytes_to_samples(mpg123_handle *fr , off_t b) +{ + return b / fr->af.encsize / fr->af.channels; +} + + +#ifndef NO_32BIT +/* Remove every fourth byte, facilitating conversion from 32 bit to 24 bit integers. + This has to be aware of endianness, of course. */ +static void chop_fourth_byte(struct outbuffer *buf) +{ + unsigned char *wpos = buf->data; + unsigned char *rpos = buf->data; +#ifdef WORDS_BIGENDIAN + while((size_t) (rpos - buf->data + 4) <= buf->fill) + { + /* Really stupid: Copy, increment. Byte per byte. */ + *wpos = *rpos; + wpos++; rpos++; + *wpos = *rpos; + wpos++; rpos++; + *wpos = *rpos; + wpos++; rpos++; + rpos++; /* Skip the lowest byte (last). */ + } +#else + while((size_t) (rpos - buf->data + 4) <= buf->fill) + { + /* Really stupid: Copy, increment. Byte per byte. */ + rpos++; /* Skip the lowest byte (first). */ + *wpos = *rpos; + wpos++; rpos++; + *wpos = *rpos; + wpos++; rpos++; + *wpos = *rpos; + wpos++; rpos++; + } +#endif + buf->fill = wpos-buf->data; +} +#endif + +void postprocess_buffer(mpg123_handle *fr) +{ + /* Handle unsigned output formats via reshifting after decode here. + Also handle conversion to 24 bit. */ +#ifndef NO_32BIT + if(fr->af.encoding == MPG123_ENC_UNSIGNED_32 || fr->af.encoding == MPG123_ENC_UNSIGNED_24) + { /* 32bit signed -> unsigned */ + size_t i; + int32_t *ssamples; + uint32_t *usamples; + ssamples = (int32_t*)fr->buffer.data; + usamples = (uint32_t*)fr->buffer.data; + debug("converting output to unsigned 32 bit integer"); + for(i=0; ibuffer.fill/sizeof(int32_t); ++i) + { + /* Different strategy since we don't have a larger type at hand. + Also watch out for silly +-1 fun because integer constants are signed in C90! */ + if(ssamples[i] >= 0) + usamples[i] = (uint32_t)ssamples[i] + 2147483647+1; + /* The smalles value goes zero. */ + else if(ssamples[i] == ((int32_t)-2147483647-1)) + usamples[i] = 0; + /* Now -value is in the positive range of signed int ... so it's a possible value at all. */ + else + usamples[i] = (uint32_t)2147483647+1 - (uint32_t)(-ssamples[i]); + } + /* Dumb brute force: A second pass for hacking off the last byte. */ + if(fr->af.encoding == MPG123_ENC_UNSIGNED_24) + chop_fourth_byte(&fr->buffer); + } + else if(fr->af.encoding == MPG123_ENC_SIGNED_24) + { + /* We got 32 bit signed ... chop off for 24 bit signed. */ + chop_fourth_byte(&fr->buffer); + } +#endif +#ifndef NO_16BIT + if(fr->af.encoding == MPG123_ENC_UNSIGNED_16) + { + size_t i; + short *ssamples; + unsigned short *usamples; + ssamples = (short*)fr->buffer.data; + usamples = (unsigned short*)fr->buffer.data; + debug("converting output to unsigned 16 bit integer"); + for(i=0; ibuffer.fill/sizeof(short); ++i) + { + long tmp = (long)ssamples[i]+32768; + usamples[i] = (unsigned short)tmp; + } + } +#endif +} diff --git a/deps/mpg123/src/libmpg123/frame.c b/deps/mpg123/src/libmpg123/frame.c new file mode 100644 index 0000000..f18b781 --- /dev/null +++ b/deps/mpg123/src/libmpg123/frame.c @@ -0,0 +1,1046 @@ +/* + frame: Heap of routines dealing with the core mpg123 data structure. + + copyright 2008-2010 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Thomas Orgis +*/ + +#include "mpg123lib_intern.h" +#include "getcpuflags.h" +#include "debug.h" + +static void frame_fixed_reset(mpg123_handle *fr); + +/* that's doubled in decode_ntom.c */ +#define NTOM_MUL (32768) + +#define aligned_pointer(p, type, alignment) align_the_pointer(p, alignment) +static void *align_the_pointer(void *base, unsigned int alignment) +{ + /* + Work in unsigned integer realm, explicitly. + Tricking the compiler into integer operations like % by invoking base-NULL is dangerous: It results into ptrdiff_t, which gets negative on big addresses. Big screw up, that. + I try to do it "properly" here: Casting only to uintptr_t and no artihmethic with void*. + */ + uintptr_t baseval = (uintptr_t)(char*)base; + uintptr_t aoff = baseval % alignment; + + debug3("align_the_pointer: pointer %p is off by %u from %u", + base, (unsigned int)aoff, alignment); + + if(aoff) return (char*)base+alignment-aoff; + else return base; +} + +static void frame_default_pars(mpg123_pars *mp) +{ + mp->outscale = 1.0; + mp->flags = 0; +#ifdef GAPLESS + mp->flags |= MPG123_GAPLESS; +#endif + mp->flags |= MPG123_AUTO_RESAMPLE; +#ifndef NO_NTOM + mp->force_rate = 0; +#endif + mp->down_sample = 0; + mp->rva = 0; + mp->halfspeed = 0; + mp->doublespeed = 0; + mp->verbose = 0; +#ifndef NO_ICY + mp->icy_interval = 0; +#endif + mp->timeout = 0; + mp->resync_limit = 1024; +#ifdef FRAME_INDEX + mp->index_size = INDEX_SIZE; +#endif + mp->preframes = 4; /* That's good for layer 3 ISO compliance bitstream. */ + mpg123_fmt_all(mp); + /* Default of keeping some 4K buffers at hand, should cover the "usual" use case (using 16K pipe buffers as role model). */ +#ifndef NO_FEEDER + mp->feedpool = 5; + mp->feedbuffer = 4096; +#endif +} + +void frame_init(mpg123_handle *fr) +{ + frame_init_par(fr, NULL); +} + +void frame_init_par(mpg123_handle *fr, mpg123_pars *mp) +{ + fr->own_buffer = TRUE; + fr->buffer.data = NULL; + fr->buffer.rdata = NULL; + fr->buffer.fill = 0; + fr->buffer.size = 0; + fr->rawbuffs = NULL; + fr->rawbuffss = 0; + fr->rawdecwin = NULL; + fr->rawdecwins = 0; +#ifndef NO_8BIT + fr->conv16to8_buf = NULL; +#endif +#ifdef OPT_DITHER + fr->dithernoise = NULL; +#endif + fr->layerscratch = NULL; + fr->xing_toc = NULL; + fr->cpu_opts.type = defdec(); + fr->cpu_opts.class = decclass(fr->cpu_opts.type); +#ifndef NO_NTOM + /* these two look unnecessary, check guarantee for synth_ntom_set_step (in control_generic, even)! */ + fr->ntom_val[0] = NTOM_MUL>>1; + fr->ntom_val[1] = NTOM_MUL>>1; + fr->ntom_step = NTOM_MUL; +#endif + /* unnecessary: fr->buffer.size = fr->buffer.fill = 0; */ + mpg123_reset_eq(fr); + init_icy(&fr->icy); + init_id3(fr); + /* frame_outbuffer is missing... */ + /* frame_buffers is missing... that one needs cpu opt setting! */ + /* after these... frame_reset is needed before starting full decode */ + invalidate_format(&fr->af); + fr->rdat.r_read = NULL; + fr->rdat.r_lseek = NULL; + fr->rdat.iohandle = NULL; + fr->rdat.r_read_handle = NULL; + fr->rdat.r_lseek_handle = NULL; + fr->rdat.cleanup_handle = NULL; + fr->wrapperdata = NULL; + fr->wrapperclean = NULL; + fr->decoder_change = 1; + fr->err = MPG123_OK; + if(mp == NULL) frame_default_pars(&fr->p); + else memcpy(&fr->p, mp, sizeof(struct mpg123_pars_struct)); + +#ifndef NO_FEEDER + bc_prepare(&fr->rdat.buffer, fr->p.feedpool, fr->p.feedbuffer); +#endif + + fr->down_sample = 0; /* Initialize to silence harmless errors when debugging. */ + frame_fixed_reset(fr); /* Reset only the fixed data, dynamic buffers are not there yet! */ + fr->synth = NULL; + fr->synth_mono = NULL; + fr->make_decode_tables = NULL; +#ifdef FRAME_INDEX + fi_init(&fr->index); + frame_index_setup(fr); /* Apply the size setting. */ +#endif +} + +#ifdef OPT_DITHER +/* Also, only allocate the memory for the table on demand. + In future, one could create special noise for different sampling frequencies(?). */ +int frame_dither_init(mpg123_handle *fr) +{ + /* run-time dither noise table generation */ + if(fr->dithernoise == NULL) + { + fr->dithernoise = malloc(sizeof(float)*DITHERSIZE); + if(fr->dithernoise == NULL) return 0; + + dither_table_init(fr->dithernoise); + } + return 1; +} +#endif + +mpg123_pars attribute_align_arg *mpg123_new_pars(int *error) +{ + mpg123_pars *mp = malloc(sizeof(struct mpg123_pars_struct)); + if(mp != NULL){ frame_default_pars(mp); if(error != NULL) *error = MPG123_OK; } + else if(error != NULL) *error = MPG123_OUT_OF_MEM; + return mp; +} + +void attribute_align_arg mpg123_delete_pars(mpg123_pars* mp) +{ + if(mp != NULL) free(mp); +} + +int attribute_align_arg mpg123_reset_eq(mpg123_handle *mh) +{ + int i; + mh->have_eq_settings = 0; + for(i=0; i < 32; ++i) mh->equalizer[0][i] = mh->equalizer[1][i] = DOUBLE_TO_REAL(1.0); + + return MPG123_OK; +} + +int frame_outbuffer(mpg123_handle *fr) +{ + size_t size = fr->outblock; + if(!fr->own_buffer) + { + if(fr->buffer.size < size) + { + fr->err = MPG123_BAD_BUFFER; + if(NOQUIET) error2("have external buffer of size %"SIZE_P", need %"SIZE_P, (size_p)fr->buffer.size, size); + + return MPG123_ERR; + } + } + + debug1("need frame buffer of %"SIZE_P, (size_p)size); + if(fr->buffer.rdata != NULL && fr->buffer.size != size) + { + free(fr->buffer.rdata); + fr->buffer.rdata = NULL; + } + fr->buffer.size = size; + fr->buffer.data = NULL; + /* be generous: use 16 byte alignment */ + if(fr->buffer.rdata == NULL) fr->buffer.rdata = (unsigned char*) malloc(fr->buffer.size+15); + if(fr->buffer.rdata == NULL) + { + fr->err = MPG123_OUT_OF_MEM; + return MPG123_ERR; + } + fr->buffer.data = aligned_pointer(fr->buffer.rdata, unsigned char*, 16); + fr->own_buffer = TRUE; + fr->buffer.fill = 0; + return MPG123_OK; +} + +int attribute_align_arg mpg123_replace_buffer(mpg123_handle *mh, unsigned char *data, size_t size) +{ + debug2("replace buffer with %p size %"SIZE_P, data, (size_p)size); + /* Will accept any size, the error comes later... */ + if(data == NULL) + { + mh->err = MPG123_BAD_BUFFER; + return MPG123_ERR; + } + if(mh->buffer.rdata != NULL) free(mh->buffer.rdata); + mh->own_buffer = FALSE; + mh->buffer.rdata = NULL; + mh->buffer.data = data; + mh->buffer.size = size; + mh->buffer.fill = 0; + return MPG123_OK; +} + +#ifdef FRAME_INDEX +int frame_index_setup(mpg123_handle *fr) +{ + int ret = MPG123_ERR; + if(fr->p.index_size >= 0) + { /* Simple fixed index. */ + fr->index.grow_size = 0; + debug1("resizing index to %li", fr->p.index_size); + ret = fi_resize(&fr->index, (size_t)fr->p.index_size); + debug2("index resized... %lu at %p", (unsigned long)fr->index.size, (void*)fr->index.data); + } + else + { /* A growing index. We give it a start, though. */ + fr->index.grow_size = (size_t)(- fr->p.index_size); + if(fr->index.size < fr->index.grow_size) + ret = fi_resize(&fr->index, fr->index.grow_size); + else + ret = MPG123_OK; /* We have minimal size already... and since growing is OK... */ + } + debug2("set up frame index of size %lu (ret=%i)", (unsigned long)fr->index.size, ret); + + return ret; +} +#endif + +static void frame_decode_buffers_reset(mpg123_handle *fr) +{ + memset(fr->rawbuffs, 0, fr->rawbuffss); +} + +int frame_buffers(mpg123_handle *fr) +{ + int buffssize = 0; + debug1("frame %p buffer", (void*)fr); +/* + the used-to-be-static buffer of the synth functions, has some subtly different types/sizes + + 2to1, 4to1, ntom, generic, i386: real[2][2][0x110] + mmx, sse: short[2][2][0x110] + i586(_dither): 4352 bytes; int/long[2][2][0x110] + i486: int[2][2][17*FIR_BUFFER_SIZE] + altivec: static real __attribute__ ((aligned (16))) buffs[4][4][0x110] + + Huh, altivec looks like fun. Well, let it be large... then, the 16 byte alignment seems to be implicit on MacOSX malloc anyway. + Let's make a reasonable attempt to allocate enough memory... + Keep in mind: biggest ones are i486 and altivec (mutually exclusive!), then follows i586 and normal real. + mmx/sse use short but also real for resampling. + Thus, minimum is 2*2*0x110*sizeof(real). +*/ + if(fr->cpu_opts.type == altivec) buffssize = 4*4*0x110*sizeof(real); +#ifdef OPT_I486 + else if(fr->cpu_opts.type == ivier) buffssize = 2*2*17*FIR_BUFFER_SIZE*sizeof(int); +#endif + else if(fr->cpu_opts.type == ifuenf || fr->cpu_opts.type == ifuenf_dither || fr->cpu_opts.type == dreidnow) + buffssize = 2*2*0x110*4; /* don't rely on type real, we need 4352 bytes */ + + if(2*2*0x110*sizeof(real) > buffssize) + buffssize = 2*2*0x110*sizeof(real); + buffssize += 15; /* For 16-byte alignment (SSE likes that). */ + + if(fr->rawbuffs != NULL && fr->rawbuffss != buffssize) + { + free(fr->rawbuffs); + fr->rawbuffs = NULL; + } + + if(fr->rawbuffs == NULL) fr->rawbuffs = (unsigned char*) malloc(buffssize); + if(fr->rawbuffs == NULL) return -1; + fr->rawbuffss = buffssize; + fr->short_buffs[0][0] = aligned_pointer(fr->rawbuffs,short,16); + fr->short_buffs[0][1] = fr->short_buffs[0][0] + 0x110; + fr->short_buffs[1][0] = fr->short_buffs[0][1] + 0x110; + fr->short_buffs[1][1] = fr->short_buffs[1][0] + 0x110; + fr->real_buffs[0][0] = aligned_pointer(fr->rawbuffs,real,16); + fr->real_buffs[0][1] = fr->real_buffs[0][0] + 0x110; + fr->real_buffs[1][0] = fr->real_buffs[0][1] + 0x110; + fr->real_buffs[1][1] = fr->real_buffs[1][0] + 0x110; +#ifdef OPT_I486 + if(fr->cpu_opts.type == ivier) + { + fr->int_buffs[0][0] = (int*) fr->rawbuffs; + fr->int_buffs[0][1] = fr->int_buffs[0][0] + 17*FIR_BUFFER_SIZE; + fr->int_buffs[1][0] = fr->int_buffs[0][1] + 17*FIR_BUFFER_SIZE; + fr->int_buffs[1][1] = fr->int_buffs[1][0] + 17*FIR_BUFFER_SIZE; + } +#endif +#ifdef OPT_ALTIVEC + if(fr->cpu_opts.type == altivec) + { + int i,j; + fr->areal_buffs[0][0] = (real*) fr->rawbuffs; + for(i=0; i<4; ++i) for(j=0; j<4; ++j) + fr->areal_buffs[i][j] = fr->areal_buffs[0][0] + (i*4+j)*0x110; + } +#endif + /* now the different decwins... all of the same size, actually */ + /* The MMX ones want 32byte alignment, which I'll try to ensure manually */ + { + int decwin_size = (512+32)*sizeof(real); +#ifdef OPT_MMXORSSE +#ifdef OPT_MULTI + if(fr->cpu_opts.class == mmxsse) + { +#endif + /* decwin_mmx will share, decwins will be appended ... sizeof(float)==4 */ + if(decwin_size < (512+32)*4) decwin_size = (512+32)*4; + + /* the second window + alignment zone -- we align for 32 bytes for SSE as + requirement, 64 byte for matching cache line size (that matters!) */ + decwin_size += (512+32)*4 + 63; + /* (512+32)*4/32 == 2176/32 == 68, so one decwin block retains alignment for 32 or 64 bytes */ +#ifdef OPT_MULTI + } +#endif +#endif +#if defined(OPT_ALTIVEC) || defined(OPT_ARM) + /* sizeof(real) >= 4 ... yes, it could be 8, for example. + We got it intialized to at least (512+32)*sizeof(real).*/ + decwin_size += 512*sizeof(real); +#endif + /* Hm, that's basically realloc() ... */ + if(fr->rawdecwin != NULL && fr->rawdecwins != decwin_size) + { + free(fr->rawdecwin); + fr->rawdecwin = NULL; + } + + if(fr->rawdecwin == NULL) + fr->rawdecwin = (unsigned char*) malloc(decwin_size); + + if(fr->rawdecwin == NULL) return -1; + + fr->rawdecwins = decwin_size; + fr->decwin = (real*) fr->rawdecwin; +#ifdef OPT_MMXORSSE +#ifdef OPT_MULTI + if(fr->cpu_opts.class == mmxsse) + { +#endif + /* align decwin, assign that to decwin_mmx, append decwins */ + /* I need to add to decwin what is missing to the next full 64 byte -- also I want to make gcc -pedantic happy... */ + fr->decwin = aligned_pointer(fr->rawdecwin,real,64); + debug1("aligned decwin: %p", (void*)fr->decwin); + fr->decwin_mmx = (float*)fr->decwin; + fr->decwins = fr->decwin_mmx+512+32; +#ifdef OPT_MULTI + } + else debug("no decwins/decwin_mmx for that class"); +#endif +#endif + } + + /* Layer scratch buffers are of compile-time fixed size, so allocate only once. */ + if(fr->layerscratch == NULL) + { + /* Allocate specific layer1/2/3 buffers, so that we know they'll work for SSE. */ + size_t scratchsize = 0; + real *scratcher; +#ifndef NO_LAYER1 + scratchsize += sizeof(real) * 2 * SBLIMIT; +#endif +#ifndef NO_LAYER2 + scratchsize += sizeof(real) * 2 * 4 * SBLIMIT; +#endif +#ifndef NO_LAYER3 + scratchsize += sizeof(real) * 2 * SBLIMIT * SSLIMIT; /* hybrid_in */ + scratchsize += sizeof(real) * 2 * SSLIMIT * SBLIMIT; /* hybrid_out */ +#endif + /* + Now figure out correct alignment: + We need 16 byte minimum, smallest unit of the blocks is 2*SBLIMIT*sizeof(real), which is 64*4=256. Let's do 64bytes as heuristic for cache line (as proven useful in buffs above). + */ + fr->layerscratch = malloc(scratchsize+63); + if(fr->layerscratch == NULL) return -1; + + /* Get aligned part of the memory, then divide it up. */ + scratcher = aligned_pointer(fr->layerscratch,real,64); + /* Those funky pointer casts silence compilers... + One might change the code at hand to really just use 1D arrays, but in practice, that would not make a (positive) difference. */ +#ifndef NO_LAYER1 + fr->layer1.fraction = (real(*)[SBLIMIT])scratcher; + scratcher += 2 * SBLIMIT; +#endif +#ifndef NO_LAYER2 + fr->layer2.fraction = (real(*)[4][SBLIMIT])scratcher; + scratcher += 2 * 4 * SBLIMIT; +#endif +#ifndef NO_LAYER3 + fr->layer3.hybrid_in = (real(*)[SBLIMIT][SSLIMIT])scratcher; + scratcher += 2 * SBLIMIT * SSLIMIT; + fr->layer3.hybrid_out = (real(*)[SSLIMIT][SBLIMIT])scratcher; + scratcher += 2 * SSLIMIT * SBLIMIT; +#endif + /* Note: These buffers don't need resetting here. */ + } + + /* Only reset the buffers we created just now. */ + frame_decode_buffers_reset(fr); + + debug1("frame %p buffer done", (void*)fr); + return 0; +} + +int frame_buffers_reset(mpg123_handle *fr) +{ + fr->buffer.fill = 0; /* hm, reset buffer fill... did we do a flush? */ + fr->bsnum = 0; + /* Wondering: could it be actually _wanted_ to retain buffer contents over different files? (special gapless / cut stuff) */ + fr->bsbuf = fr->bsspace[1]; + fr->bsbufold = fr->bsbuf; + fr->bitreservoir = 0; + frame_decode_buffers_reset(fr); + memset(fr->bsspace, 0, 2*(MAXFRAMESIZE+512)); + memset(fr->ssave, 0, 34); + fr->hybrid_blc[0] = fr->hybrid_blc[1] = 0; + memset(fr->hybrid_block, 0, sizeof(real)*2*2*SBLIMIT*SSLIMIT); + return 0; +} + +static void frame_icy_reset(mpg123_handle* fr) +{ +#ifndef NO_ICY + if(fr->icy.data != NULL) free(fr->icy.data); + fr->icy.data = NULL; + fr->icy.interval = 0; + fr->icy.next = 0; +#endif +} + +static void frame_free_toc(mpg123_handle *fr) +{ + if(fr->xing_toc != NULL){ free(fr->xing_toc); fr->xing_toc = NULL; } +} + +/* Just copy the Xing TOC over... */ +int frame_fill_toc(mpg123_handle *fr, unsigned char* in) +{ + if(fr->xing_toc == NULL) fr->xing_toc = malloc(100); + if(fr->xing_toc != NULL) + { + memcpy(fr->xing_toc, in, 100); +#ifdef DEBUG + debug("Got a TOC! Showing the values..."); + { + int i; + for(i=0; i<100; ++i) + debug2("entry %i = %i", i, fr->xing_toc[i]); + } +#endif + return TRUE; + } + return FALSE; +} + +/* Prepare the handle for a new track. + Reset variables, buffers... */ +int frame_reset(mpg123_handle* fr) +{ + frame_buffers_reset(fr); + frame_fixed_reset(fr); + frame_free_toc(fr); +#ifdef FRAME_INDEX + fi_reset(&fr->index); +#endif + + return 0; +} + +/* Reset everythign except dynamic memory. */ +static void frame_fixed_reset(mpg123_handle *fr) +{ + frame_icy_reset(fr); + open_bad(fr); + fr->to_decode = FALSE; + fr->to_ignore = FALSE; + fr->metaflags = 0; + fr->outblock = 0; /* This will be set before decoding! */ + fr->num = -1; + fr->input_offset = -1; + fr->playnum = -1; + fr->state_flags = FRAME_ACCURATE; + fr->silent_resync = 0; + fr->audio_start = 0; + fr->clip = 0; + fr->oldhead = 0; + fr->firsthead = 0; + fr->vbr = MPG123_CBR; + fr->abr_rate = 0; + fr->track_frames = 0; + fr->track_samples = -1; + fr->framesize=0; + fr->mean_frames = 0; + fr->mean_framesize = 0; + fr->freesize = 0; + fr->lastscale = -1; + fr->rva.level[0] = -1; + fr->rva.level[1] = -1; + fr->rva.gain[0] = 0; + fr->rva.gain[1] = 0; + fr->rva.peak[0] = 0; + fr->rva.peak[1] = 0; + fr->fsizeold = 0; + fr->firstframe = 0; + fr->ignoreframe = fr->firstframe-fr->p.preframes; + fr->lastframe = -1; + fr->fresh = 1; + fr->new_format = 0; +#ifdef GAPLESS + frame_gapless_init(fr,-1,0,0); + fr->lastoff = 0; + fr->firstoff = 0; +#endif +#ifdef OPT_I486 + fr->i486bo[0] = fr->i486bo[1] = FIR_SIZE-1; +#endif + fr->bo = 1; /* the usual bo */ +#ifdef OPT_DITHER + fr->ditherindex = 0; +#endif + reset_id3(fr); + reset_icy(&fr->icy); + /* ICY stuff should go into icy.c, eh? */ +#ifndef NO_ICY + fr->icy.interval = 0; + fr->icy.next = 0; +#endif + fr->halfphase = 0; /* here or indeed only on first-time init? */ + fr->error_protection = 0; + fr->freeformat_framesize = -1; +} + +static void frame_free_buffers(mpg123_handle *fr) +{ + if(fr->rawbuffs != NULL) free(fr->rawbuffs); + fr->rawbuffs = NULL; + fr->rawbuffss = 0; + if(fr->rawdecwin != NULL) free(fr->rawdecwin); + fr->rawdecwin = NULL; + fr->rawdecwins = 0; +#ifndef NO_8BIT + if(fr->conv16to8_buf != NULL) free(fr->conv16to8_buf); + fr->conv16to8_buf = NULL; +#endif + if(fr->layerscratch != NULL) free(fr->layerscratch); +} + +void frame_exit(mpg123_handle *fr) +{ + if(fr->buffer.rdata != NULL) + { + debug1("freeing buffer at %p", (void*)fr->buffer.rdata); + free(fr->buffer.rdata); + } + fr->buffer.rdata = NULL; + frame_free_buffers(fr); + frame_free_toc(fr); +#ifdef FRAME_INDEX + fi_exit(&fr->index); +#endif +#ifdef OPT_DITHER + if(fr->dithernoise != NULL) + { + free(fr->dithernoise); + fr->dithernoise = NULL; + } +#endif + exit_id3(fr); + clear_icy(&fr->icy); + /* Clean up possible mess from LFS wrapper. */ + if(fr->wrapperclean != NULL) + { + fr->wrapperclean(fr->wrapperdata); + fr->wrapperdata = NULL; + } +#ifndef NO_FEEDER + bc_cleanup(&fr->rdat.buffer); +#endif +} + +int attribute_align_arg mpg123_info(mpg123_handle *mh, struct mpg123_frameinfo *mi) +{ + if(mh == NULL) return MPG123_ERR; + if(mi == NULL) + { + mh->err = MPG123_ERR_NULL; + return MPG123_ERR; + } + mi->version = mh->mpeg25 ? MPG123_2_5 : (mh->lsf ? MPG123_2_0 : MPG123_1_0); + mi->layer = mh->lay; + mi->rate = frame_freq(mh); + switch(mh->mode) + { + case 0: mi->mode = MPG123_M_STEREO; break; + case 1: mi->mode = MPG123_M_JOINT; break; + case 2: mi->mode = MPG123_M_DUAL; break; + case 3: mi->mode = MPG123_M_MONO; break; + default: error("That mode cannot be!"); + } + mi->mode_ext = mh->mode_ext; + mi->framesize = mh->framesize+4; /* Include header. */ + mi->flags = 0; + if(mh->error_protection) mi->flags |= MPG123_CRC; + if(mh->copyright) mi->flags |= MPG123_COPYRIGHT; + if(mh->extension) mi->flags |= MPG123_PRIVATE; + if(mh->original) mi->flags |= MPG123_ORIGINAL; + mi->emphasis = mh->emphasis; + mi->bitrate = frame_bitrate(mh); + mi->abr_rate = mh->abr_rate; + mi->vbr = mh->vbr; + return MPG123_OK; +} + +int attribute_align_arg mpg123_framedata(mpg123_handle *mh, unsigned long *header, unsigned char **bodydata, size_t *bodybytes) +{ + if(mh == NULL) return MPG123_ERR; + if(!mh->to_decode) return MPG123_ERR; + + if(header != NULL) *header = mh->oldhead; + if(bodydata != NULL) *bodydata = mh->bsbuf; + if(bodybytes != NULL) *bodybytes = mh->framesize; + + return MPG123_OK; +} + +/* + Fuzzy frame offset searching (guessing). + When we don't have an accurate position, we may use an inaccurate one. + Possibilities: + - use approximate positions from Xing TOC (not yet parsed) + - guess wildly from mean framesize and offset of first frame / beginning of file. +*/ + +static off_t frame_fuzzy_find(mpg123_handle *fr, off_t want_frame, off_t* get_frame) +{ + /* Default is to go to the beginning. */ + off_t ret = fr->audio_start; + *get_frame = 0; + + /* But we try to find something better. */ + /* Xing VBR TOC works with relative positions, both in terms of audio frames and stream bytes. + Thus, it only works when whe know the length of things. + Oh... I assume the offsets are relative to the _total_ file length. */ + if(fr->xing_toc != NULL && fr->track_frames > 0 && fr->rdat.filelen > 0) + { + /* One could round... */ + int toc_entry = (int) ((double)want_frame*100./fr->track_frames); + /* It is an index in the 100-entry table. */ + if(toc_entry < 0) toc_entry = 0; + if(toc_entry > 99) toc_entry = 99; + + /* Now estimate back what frame we get. */ + *get_frame = (off_t) ((double)toc_entry/100. * fr->track_frames); + fr->state_flags &= ~FRAME_ACCURATE; + fr->silent_resync = 1; + /* Question: Is the TOC for whole file size (with/without ID3) or the "real" audio data only? + ID3v1 info could also matter. */ + ret = (off_t) ((double)fr->xing_toc[toc_entry]/256.* fr->rdat.filelen); + } + else if(fr->mean_framesize > 0) + { /* Just guess with mean framesize (may be exact with CBR files). */ + /* Query filelen here or not? */ + fr->state_flags &= ~FRAME_ACCURATE; /* Fuzzy! */ + fr->silent_resync = 1; + *get_frame = want_frame; + ret = (off_t) (fr->audio_start+fr->mean_framesize*want_frame); + } + debug5("fuzzy: want %li of %li, get %li at %li B of %li B", + (long)want_frame, (long)fr->track_frames, (long)*get_frame, (long)ret, (long)(fr->rdat.filelen-fr->audio_start)); + return ret; +} + +/* + find the best frame in index just before the wanted one, seek to there + then step to just before wanted one with read_frame + do not care tabout the stuff that was in buffer but not played back + everything that left the decoder is counted as played + + Decide if you want low latency reaction and accurate timing info or stable long-time playback with buffer! +*/ + +off_t frame_index_find(mpg123_handle *fr, off_t want_frame, off_t* get_frame) +{ + /* default is file start if no index position */ + off_t gopos = 0; + *get_frame = 0; +#ifdef FRAME_INDEX + /* Possibly use VBRI index, too? I'd need an example for this... */ + if(fr->index.fill) + { + /* find in index */ + size_t fi; + /* at index fi there is frame step*fi... */ + fi = want_frame/fr->index.step; + if(fi >= fr->index.fill) /* If we are beyond the end of frame index...*/ + { + /* When fuzzy seek is allowed, we have some limited tolerance for the frames we want to read rather then jump over. */ + if(fr->p.flags & MPG123_FUZZY && want_frame - (fr->index.fill-1)*fr->index.step > 10) + { + gopos = frame_fuzzy_find(fr, want_frame, get_frame); + if(gopos > fr->audio_start) return gopos; /* Only in that case, we have a useful guess. */ + /* Else... just continue, fuzzyness didn't help. */ + } + /* Use the last available position, slowly advancing from that one. */ + fi = fr->index.fill - 1; + } + /* We have index position, that yields frame and byte offsets. */ + *get_frame = fi*fr->index.step; + gopos = fr->index.data[fi]; + fr->state_flags |= FRAME_ACCURATE; /* When using the frame index, we are accurate. */ + } + else + { +#endif + if(fr->p.flags & MPG123_FUZZY) + return frame_fuzzy_find(fr, want_frame, get_frame); + /* A bit hackish here... but we need to be fresh when looking for the first header again. */ + fr->firsthead = 0; + fr->oldhead = 0; +#ifdef FRAME_INDEX + } +#endif + debug2("index: 0x%lx for frame %li", (unsigned long)gopos, (long) *get_frame); + return gopos; +} + +off_t frame_ins2outs(mpg123_handle *fr, off_t ins) +{ + off_t outs = 0; + switch(fr->down_sample) + { + case 0: +# ifndef NO_DOWNSAMPLE + case 1: + case 2: +# endif + outs = ins>>fr->down_sample; + break; +# ifndef NO_NTOM + case 3: outs = ntom_ins2outs(fr, ins); break; +# endif + default: error1("Bad down_sample (%i) ... should not be possible!!", fr->down_sample); + } + return outs; +} + +off_t frame_outs(mpg123_handle *fr, off_t num) +{ + off_t outs = 0; + switch(fr->down_sample) + { + case 0: +# ifndef NO_DOWNSAMPLE + case 1: + case 2: +# endif + outs = (spf(fr)>>fr->down_sample)*num; + break; +#ifndef NO_NTOM + case 3: outs = ntom_frmouts(fr, num); break; +#endif + default: error1("Bad down_sample (%i) ... should not be possible!!", fr->down_sample); + } + return outs; +} + +/* Compute the number of output samples we expect from this frame. + This is either simple spf() or a tad more elaborate for ntom. */ +off_t frame_expect_outsamples(mpg123_handle *fr) +{ + off_t outs = 0; + switch(fr->down_sample) + { + case 0: +# ifndef NO_DOWNSAMPLE + case 1: + case 2: +# endif + outs = spf(fr)>>fr->down_sample; + break; +#ifndef NO_NTOM + case 3: outs = ntom_frame_outsamples(fr); break; +#endif + default: error1("Bad down_sample (%i) ... should not be possible!!", fr->down_sample); + } + return outs; +} + +off_t frame_offset(mpg123_handle *fr, off_t outs) +{ + off_t num = 0; + switch(fr->down_sample) + { + case 0: +# ifndef NO_DOWNSAMPLE + case 1: + case 2: +# endif + num = outs/(spf(fr)>>fr->down_sample); + break; +#ifndef NO_NTOM + case 3: num = ntom_frameoff(fr, outs); break; +#endif + default: error("Bad down_sample ... should not be possible!!"); + } + return num; +} + +#ifdef GAPLESS +/* input in _input_ samples */ +void frame_gapless_init(mpg123_handle *fr, off_t framecount, off_t bskip, off_t eskip) +{ + debug3("frame_gaples_init: given %"OFF_P" frames, skip %"OFF_P" and %"OFF_P, (off_p)framecount, (off_p)bskip, (off_p)eskip); + fr->gapless_frames = framecount; + if(fr->gapless_frames > 0) + { + fr->begin_s = bskip+GAPLESS_DELAY; + fr->end_s = framecount*spf(fr)-eskip+GAPLESS_DELAY; + } + else fr->begin_s = fr->end_s = 0; + /* These will get proper values later, from above plus resampling info. */ + fr->begin_os = 0; + fr->end_os = 0; + fr->fullend_os = 0; + debug2("frame_gapless_init: from %"OFF_P" to %"OFF_P" samples", (off_p)fr->begin_s, (off_p)fr->end_s); +} + +void frame_gapless_realinit(mpg123_handle *fr) +{ + fr->begin_os = frame_ins2outs(fr, fr->begin_s); + fr->end_os = frame_ins2outs(fr, fr->end_s); + fr->fullend_os = frame_ins2outs(fr, fr->gapless_frames*spf(fr)); + debug2("frame_gapless_realinit: from %"OFF_P" to %"OFF_P" samples", (off_p)fr->begin_os, (off_p)fr->end_os); +} + +/* At least note when there is trouble... */ +void frame_gapless_update(mpg123_handle *fr, off_t total_samples) +{ + off_t gapless_samples = fr->gapless_frames*spf(fr); + debug2("gapless update with new sample count %"OFF_P" as opposed to known %"OFF_P, total_samples, gapless_samples); + if(NOQUIET && total_samples != gapless_samples) + fprintf(stderr, "\nWarning: Real sample count differs from given gapless sample count. Frankenstein stream?\n"); + + if(gapless_samples > total_samples) + { + if(NOQUIET) error2("End sample count smaller than gapless end! (%"OFF_P" < %"OFF_P"). Disabling gapless mode from now on.", (off_p)total_samples, (off_p)fr->end_s); + /* This invalidates the current position... but what should I do? */ + frame_gapless_init(fr, -1, 0, 0); + frame_gapless_realinit(fr); + fr->lastframe = -1; + fr->lastoff = 0; + } +} + +#endif + +/* Compute the needed frame to ignore from, for getting accurate/consistent output for intended firstframe. */ +static off_t ignoreframe(mpg123_handle *fr) +{ + off_t preshift = fr->p.preframes; + /* Layer 3 _really_ needs at least one frame before. */ + if(fr->lay==3 && preshift < 1) preshift = 1; + /* Layer 1 & 2 reall do not need more than 2. */ + if(fr->lay!=3 && preshift > 2) preshift = 2; + + return fr->firstframe - preshift; +} + +/* The frame seek... This is not simply the seek to fe*spf(fr) samples in output because we think of _input_ frames here. + Seek to frame offset 1 may be just seek to 200 samples offset in output since the beginning of first frame is delay/padding. + Hm, is that right? OK for the padding stuff, but actually, should the decoder delay be better totally hidden or not? + With gapless, even the whole frame position could be advanced further than requested (since Homey don't play dat). */ +void frame_set_frameseek(mpg123_handle *fr, off_t fe) +{ + fr->firstframe = fe; +#ifdef GAPLESS + if(fr->p.flags & MPG123_GAPLESS && fr->gapless_frames > 0) + { + /* Take care of the beginning... */ + off_t beg_f = frame_offset(fr, fr->begin_os); + if(fe <= beg_f) + { + fr->firstframe = beg_f; + fr->firstoff = fr->begin_os - frame_outs(fr, beg_f); + } + else fr->firstoff = 0; + /* The end is set once for a track at least, on the frame_set_frameseek called in get_next_frame() */ + if(fr->end_os > 0) + { + fr->lastframe = frame_offset(fr,fr->end_os); + fr->lastoff = fr->end_os - frame_outs(fr, fr->lastframe); + } else {fr->lastframe = -1; fr->lastoff = 0; } + } else { fr->firstoff = fr->lastoff = 0; fr->lastframe = -1; } +#endif + fr->ignoreframe = ignoreframe(fr); +#ifdef GAPLESS + debug5("frame_set_frameseek: begin at %li frames and %li samples, end at %li and %li; ignore from %li", + (long) fr->firstframe, (long) fr->firstoff, + (long) fr->lastframe, (long) fr->lastoff, (long) fr->ignoreframe); +#else + debug3("frame_set_frameseek: begin at %li frames, end at %li; ignore from %li", + (long) fr->firstframe, (long) fr->lastframe, (long) fr->ignoreframe); +#endif +} + +void frame_skip(mpg123_handle *fr) +{ +#ifndef NO_LAYER3 + if(fr->lay == 3) set_pointer(fr, 512); +#endif +} + +/* Sample accurate seek prepare for decoder. */ +/* This gets unadjusted output samples and takes resampling into account */ +void frame_set_seek(mpg123_handle *fr, off_t sp) +{ + fr->firstframe = frame_offset(fr, sp); + debug1("frame_set_seek: from %"OFF_P, fr->num); +#ifndef NO_NTOM + if(fr->down_sample == 3) ntom_set_ntom(fr, fr->firstframe); +#endif + fr->ignoreframe = ignoreframe(fr); +#ifdef GAPLESS /* The sample offset is used for non-gapless mode, too! */ + fr->firstoff = sp - frame_outs(fr, fr->firstframe); + debug5("frame_set_seek: begin at %li frames and %li samples, end at %li and %li; ignore from %li", + (long) fr->firstframe, (long) fr->firstoff, + (long) fr->lastframe, (long) fr->lastoff, (long) fr->ignoreframe); +#else + debug3("frame_set_seek: begin at %li frames, end at %li; ignore from %li", + (long) fr->firstframe, (long) fr->lastframe, (long) fr->ignoreframe); +#endif +} + +int attribute_align_arg mpg123_volume_change(mpg123_handle *mh, double change) +{ + if(mh == NULL) return MPG123_ERR; + return mpg123_volume(mh, change + (double) mh->p.outscale); +} + +int attribute_align_arg mpg123_volume(mpg123_handle *mh, double vol) +{ + if(mh == NULL) return MPG123_ERR; + + if(vol >= 0) mh->p.outscale = vol; + else mh->p.outscale = 0.; + + do_rva(mh); + return MPG123_OK; +} + +static int get_rva(mpg123_handle *fr, double *peak, double *gain) +{ + double p = -1; + double g = 0; + int ret = 0; + if(fr->p.rva) + { + int rt = 0; + /* Should one assume a zero RVA as no RVA? */ + if(fr->p.rva == 2 && fr->rva.level[1] != -1) rt = 1; + if(fr->rva.level[rt] != -1) + { + p = fr->rva.peak[rt]; + g = fr->rva.gain[rt]; + ret = 1; /* Success. */ + } + } + if(peak != NULL) *peak = p; + if(gain != NULL) *gain = g; + return ret; +} + +/* adjust the volume, taking both fr->outscale and rva values into account */ +void do_rva(mpg123_handle *fr) +{ + double peak = 0; + double gain = 0; + double newscale; + double rvafact = 1; + if(get_rva(fr, &peak, &gain)) + { + if(NOQUIET && fr->p.verbose > 1) fprintf(stderr, "Note: doing RVA with gain %f\n", gain); + rvafact = pow(10,gain/20); + } + + newscale = fr->p.outscale*rvafact; + + /* if peak is unknown (== 0) this check won't hurt */ + if((peak*newscale) > 1.0) + { + newscale = 1.0/peak; + warning2("limiting scale value to %f to prevent clipping with indicated peak factor of %f", newscale, peak); + } + /* first rva setting is forced with fr->lastscale < 0 */ + if(newscale != fr->lastscale || fr->decoder_change) + { + debug3("changing scale value from %f to %f (peak estimated to %f)", fr->lastscale != -1 ? fr->lastscale : fr->p.outscale, newscale, (double) (newscale*peak)); + fr->lastscale = newscale; + /* It may be too early, actually. */ + if(fr->make_decode_tables != NULL) fr->make_decode_tables(fr); /* the actual work */ + } +} + + +int attribute_align_arg mpg123_getvolume(mpg123_handle *mh, double *base, double *really, double *rva_db) +{ + if(mh == NULL) return MPG123_ERR; + if(base) *base = mh->p.outscale; + if(really) *really = mh->lastscale; + get_rva(mh, NULL, rva_db); + return MPG123_OK; +} + +off_t attribute_align_arg mpg123_framepos(mpg123_handle *mh) +{ + if(mh == NULL) return MPG123_ERR; + + return mh->input_offset; +} diff --git a/deps/mpg123/src/libmpg123/frame.h b/deps/mpg123/src/libmpg123/frame.h new file mode 100644 index 0000000..26e086e --- /dev/null +++ b/deps/mpg123/src/libmpg123/frame.h @@ -0,0 +1,410 @@ +/* + frame: Central data structures and opmitization hooks. + + copyright 2007 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Thomas Orgis +*/ + +#ifndef MPG123_FRAME_H +#define MPG123_FRAME_H + +#include +#include "config.h" +#include "mpg123.h" +#include "optimize.h" +#include "id3.h" +#include "icy.h" +#include "reader.h" +#ifdef FRAME_INDEX +#include "index.h" +#endif +#include "synths.h" + +#ifdef OPT_DITHER +#include "dither.h" +int frame_dither_init(mpg123_handle *fr); +#endif + +/* max = 1728 */ +#define MAXFRAMESIZE 3456 + +struct al_table +{ + short bits; + short d; +}; + +/* the output buffer, used to be pcm_sample, pcm_point and audiobufsize */ +struct outbuffer +{ + unsigned char *data; /* main data pointer, aligned */ + unsigned char *p; /* read pointer */ + size_t fill; /* fill from read pointer */ + size_t size; + unsigned char *rdata; /* unaligned base pointer */ +}; + +struct audioformat +{ + int encoding; + int encsize; /* Size of one sample in bytes, plain int should be fine here... */ + int channels; + long rate; +}; + +void invalidate_format(struct audioformat *af); + +struct mpg123_pars_struct +{ + int verbose; /* verbose level */ + long flags; /* combination of above */ +#ifndef NO_NTOM + long force_rate; +#endif + int down_sample; + int rva; /* (which) rva to do: 0: nothing, 1: radio/mix/track 2: album/audiophile */ + long halfspeed; + long doublespeed; + long timeout; +#define NUM_CHANNELS 2 + char audio_caps[NUM_CHANNELS][MPG123_RATES+1][MPG123_ENCODINGS]; +/* long start_frame; */ /* frame offset to begin with */ +/* long frame_number;*/ /* number of frames to decode */ +#ifndef NO_ICY + long icy_interval; +#endif + double outscale; + long resync_limit; + long index_size; /* Long, because: negative values have a meaning. */ + long preframes; +#ifndef NO_FEEDER + long feedpool; + long feedbuffer; +#endif +}; + +enum frame_state_flags +{ + FRAME_ACCURATE = 0x1 /**< 0001 Positions are considered accurate. */ + ,FRAME_FRANKENSTEIN = 0x2 /**< 0010 This stream is concatenated. */ +}; + +/* There is a lot to condense here... many ints can be merged as flags; though the main space is still consumed by buffers. */ +struct mpg123_handle_struct +{ + int fresh; /* to be moved into flags */ + int new_format; + real hybrid_block[2][2][SBLIMIT*SSLIMIT]; + int hybrid_blc[2]; + /* the scratch vars for the decoders, sometimes real, sometimes short... sometimes int/long */ + short *short_buffs[2][2]; + real *real_buffs[2][2]; + unsigned char *rawbuffs; + int rawbuffss; +#ifdef OPT_I486 + int i486bo[2]; +#endif + int bo; /* Just have it always here. */ +#ifdef OPT_DITHER + int ditherindex; + float *dithernoise; +#endif + unsigned char* rawdecwin; /* the block with all decwins */ + int rawdecwins; /* size of rawdecwin memory */ + real *decwin; /* _the_ decode table */ +#ifdef OPT_MMXORSSE + /* I am not really sure that I need both of them... used in assembler */ + float *decwin_mmx; + float *decwins; +#endif + int have_eq_settings; + real equalizer[2][32]; + + /* for halfspeed mode */ + unsigned char ssave[34]; + int halfphase; +#ifndef NO_8BIT + /* a raw buffer and a pointer into the middle for signed short conversion, only allocated on demand */ + unsigned char *conv16to8_buf; + unsigned char *conv16to8; +#endif + /* There's some possible memory saving for stuff that is not _really_ dynamic. */ + + /* layer3 */ + int longLimit[9][23]; + int shortLimit[9][14]; + real gainpow2[256+118+4]; /* not really dynamic, just different for mmx */ + + /* layer2 */ + real muls[27][64]; /* also used by layer 1 */ + +#ifndef NO_NTOM + /* decode_ntom */ + unsigned long ntom_val[2]; + unsigned long ntom_step; +#endif + /* special i486 fun */ +#ifdef OPT_I486 + int *int_buffs[2][2]; +#endif + /* special altivec... */ +#ifdef OPT_ALTIVEC + real *areal_buffs[4][4]; +#endif + struct synth_s synths; + struct + { +#ifdef OPT_MULTI + +#ifndef NO_LAYER3 +#if (defined OPT_3DNOW || defined OPT_3DNOWEXT) + void (*the_dct36)(real *,real *,real *,real *,real *); +#endif +#endif + +#endif + enum optdec type; + enum optcla class; + } cpu_opts; + + int verbose; /* 0: nothing, 1: just print chosen decoder, 2: be verbose */ + + const struct al_table *alloc; + /* The runtime-chosen decoding, based on input and output format. */ + func_synth synth; + func_synth_stereo synth_stereo; + func_synth_mono synth_mono; + /* Yes, this function is runtime-switched, too. */ + void (*make_decode_tables)(mpg123_handle *fr); /* That is the volume control. */ + + int stereo; /* I _think_ 1 for mono and 2 for stereo */ + int jsbound; +#define SINGLE_STEREO -1 +#define SINGLE_LEFT 0 +#define SINGLE_RIGHT 1 +#define SINGLE_MIX 3 + int single; + int II_sblimit; + int down_sample_sblimit; + int lsf; /* 0: MPEG 1.0; 1: MPEG 2.0/2.5 -- both used as bool and array index! */ + /* Many flags in disguise as integers... wasting bytes. */ + int mpeg25; + int down_sample; + int header_change; + int lay; + int (*do_layer)(mpg123_handle *); + int error_protection; + int bitrate_index; + int sampling_frequency; + int padding; + int extension; + int mode; + int mode_ext; + int copyright; + int original; + int emphasis; + int framesize; /* computed framesize */ + int freesize; /* free format frame size */ + enum mpg123_vbr vbr; /* 1 if variable bitrate was detected */ + off_t num; /* frame offset ... */ + off_t input_offset; /* byte offset of this frame in input stream */ + off_t playnum; /* playback offset... includes repetitions, reset at seeks */ + off_t audio_start; /* The byte offset in the file where audio data begins. */ + int state_flags; + char silent_resync; /* Do not complain for the next n resyncs. */ + unsigned char* xing_toc; /* The seek TOC from Xing header. */ + int freeformat; + long freeformat_framesize; + + /* bitstream info; bsi */ + int bitindex; + unsigned char *wordpointer; + /* temporary storage for getbits stuff */ + unsigned long ultmp; + unsigned char uctmp; + + /* rva data, used in common.c, set in id3.c */ + + double maxoutburst; /* The maximum amplitude in current sample represenation. */ + double lastscale; + struct + { + int level[2]; + float gain[2]; + float peak[2]; + } rva; + + /* input data */ + off_t track_frames; + off_t track_samples; + double mean_framesize; + off_t mean_frames; + int fsizeold; + int ssize; + unsigned int bitreservoir; + unsigned char bsspace[2][MAXFRAMESIZE+512]; /* MAXFRAMESIZE */ + unsigned char *bsbuf; + unsigned char *bsbufold; + int bsnum; + /* That is the header matching the last read frame body. */ + unsigned long oldhead; + /* That is the header that is supposedly the first of the stream. */ + unsigned long firsthead; + int abr_rate; +#ifdef FRAME_INDEX + struct frame_index index; +#endif + + /* output data */ + struct outbuffer buffer; + struct audioformat af; + int own_buffer; + size_t outblock; /* number of bytes that this frame produces (upper bound) */ + int to_decode; /* this frame holds data to be decoded */ + int to_ignore; /* the same, somehow */ + off_t firstframe; /* start decoding from here */ + off_t lastframe; /* last frame to decode (for gapless or num_frames limit) */ + off_t ignoreframe; /* frames to decode but discard before firstframe */ +#ifdef GAPLESS + off_t gapless_frames; /* frame count for the gapless part */ + off_t firstoff; /* number of samples to ignore from firstframe */ + off_t lastoff; /* number of samples to use from lastframe */ + off_t begin_s; /* overall begin offset in samples */ + off_t begin_os; + off_t end_s; /* overall end offset in samples */ + off_t end_os; + off_t fullend_os; /* gapless_frames translated to output samples */ +#endif + unsigned int crc; /* Well, I need a safe 16bit type, actually. But wider doesn't hurt. */ + struct reader *rd; /* pointer to the reading functions */ + struct reader_data rdat; /* reader data and state info */ + struct mpg123_pars_struct p; + int err; + int decoder_change; + int delayed_change; + long clip; + /* the meta crap */ + int metaflags; + unsigned char id3buf[128]; +#ifndef NO_ID3V2 + mpg123_id3v2 id3v2; +#endif +#ifndef NO_ICY + struct icy_meta icy; +#endif + /* + More variables needed for decoders, layerX.c. + This time it is not about static variables but about the need for alignment which cannot be guaranteed on the stack by certain compilers (Sun Studio). + We do not require the compiler to align stuff for our hand-written assembly. We only hope that it's able to align stuff for SSE and similar ops it generates itself. + */ + /* + Those layer-specific structs could actually share memory, as they are not in use simultaneously. One might allocate on decoder switch, too. + They all reside in one lump of memory (after each other), allocated to layerscratch. + */ + real *layerscratch; +#ifndef NO_LAYER1 + struct + { + real (*fraction)[SBLIMIT]; /* ALIGNED(16) real fraction[2][SBLIMIT]; */ + } layer1; +#endif +#ifndef NO_LAYER2 + struct + { + real (*fraction)[4][SBLIMIT]; /* ALIGNED(16) real fraction[2][4][SBLIMIT] */ + } layer2; +#endif +#ifndef NO_LAYER3 + /* These are significant chunks of memory already... */ + struct + { + real (*hybrid_in)[SBLIMIT][SSLIMIT]; /* ALIGNED(16) real hybridIn[2][SBLIMIT][SSLIMIT]; */ + real (*hybrid_out)[SSLIMIT][SBLIMIT]; /* ALIGNED(16) real hybridOut[2][SSLIMIT][SBLIMIT]; */ + } layer3; +#endif + /* A place for storing additional data for the large file wrapper. + This is cruft! */ + void *wrapperdata; + /* A callback used to properly destruct the wrapper data. */ + void (*wrapperclean)(void*); +}; + +/* generic init, does not include dynamic buffers */ +void frame_init(mpg123_handle *fr); +void frame_init_par(mpg123_handle *fr, mpg123_pars *mp); +/* output buffer and format */ +int frame_outbuffer(mpg123_handle *fr); +int frame_output_format(mpg123_handle *fr); + +int frame_buffers(mpg123_handle *fr); /* various decoder buffers, needed once */ +int frame_reset(mpg123_handle* fr); /* reset for next track */ +int frame_buffers_reset(mpg123_handle *fr); +void frame_exit(mpg123_handle *fr); /* end, free all buffers */ + +/* Index functions... */ +/* Well... print it... */ +int mpg123_print_index(mpg123_handle *fr, FILE* out); +/* Find a seek position in index. */ +off_t frame_index_find(mpg123_handle *fr, off_t want_frame, off_t* get_frame); +/* Apply index_size setting. */ +int frame_index_setup(mpg123_handle *fr); + +void do_volume(mpg123_handle *fr, double factor); +void do_rva(mpg123_handle *fr); + +/* samples per frame ... +Layer I +Layer II +Layer III +MPEG-1 +384 +1152 +1152 +MPEG-2 LSF +384 +1152 +576 +MPEG 2.5 +384 +1152 +576 +*/ +#define spf(fr) ((fr)->lay == 1 ? 384 : ((fr)->lay==2 ? 1152 : ((fr)->lsf || (fr)->mpeg25 ? 576 : 1152))) + +#ifdef GAPLESS +/* well, I take that one for granted... at least layer3 */ +#define GAPLESS_DELAY 529 +void frame_gapless_init(mpg123_handle *fr, off_t framecount, off_t bskip, off_t eskip); +void frame_gapless_realinit(mpg123_handle *fr); +void frame_gapless_update(mpg123_handle *mh, off_t total_samples); +/*void frame_gapless_position(mpg123_handle* fr); +void frame_gapless_bytify(mpg123_handle *fr); +void frame_gapless_ignore(mpg123_handle *fr, off_t frames);*/ +/* void frame_gapless_buffercheck(mpg123_handle *fr); */ +#endif + +/* Number of samples the decoding of the current frame should yield. */ +off_t frame_expect_outsamples(mpg123_handle *fr); + +/* Skip this frame... do some fake action to get away without actually decoding it. */ +void frame_skip(mpg123_handle *fr); + +/* + Seeking core functions: + - convert input sample offset to output sample offset + - convert frame offset to output sample offset + - get leading frame offset for output sample offset + The offsets are "unadjusted"/internal; resampling is being taken care of. +*/ +off_t frame_ins2outs(mpg123_handle *fr, off_t ins); +off_t frame_outs(mpg123_handle *fr, off_t num); +/* This one just computes the expected sample count for _this_ frame. */ +off_t frame_expect_outsampels(mpg123_handle *fr); +off_t frame_offset(mpg123_handle *fr, off_t outs); +void frame_set_frameseek(mpg123_handle *fr, off_t fe); +void frame_set_seek(mpg123_handle *fr, off_t sp); +off_t frame_tell_seek(mpg123_handle *fr); +/* Take a copy of the Xing VBR TOC for fuzzy seeking. */ +int frame_fill_toc(mpg123_handle *fr, unsigned char* in); +#endif diff --git a/deps/mpg123/src/libmpg123/gapless.h b/deps/mpg123/src/libmpg123/gapless.h new file mode 100644 index 0000000..a98b86b --- /dev/null +++ b/deps/mpg123/src/libmpg123/gapless.h @@ -0,0 +1,119 @@ +/* + sampleadjust: gapless sample offset math + + copyright 1995-2012 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + + This is no stand-alone header, precisely to be able to fool it into using fake handle types for testing the math. +*/ + +#include "debug.h" + +#ifdef GAPLESS +/* From internal sample number to external. */ +static off_t sample_adjust(mpg123_handle *mh, off_t x) +{ + off_t s; + if(mh->p.flags & MPG123_GAPLESS) + { + /* It's a bit tricky to do this computation for the padding samples. + They are not there on the outside. */ + if(x > mh->end_os) + { + if(x < mh->fullend_os) + s = mh->end_os - mh->begin_os; + else + s = x - (mh->fullend_os - mh->end_os + mh->begin_os); + } + else + s = x - mh->begin_os; + } + else + s = x; + + return s; +} + +/* from external samples to internal */ +static off_t sample_unadjust(mpg123_handle *mh, off_t x) +{ + off_t s; + if(mh->p.flags & MPG123_GAPLESS) + { + s = x + mh->begin_os; + /* There is a hole; we don't create sample positions in there. + Jump from the end of the gapless track directly to after the padding. */ + if(s >= mh->end_os) + s += mh->fullend_os - mh->end_os; + } + else s = x; + + return s; +} + +/* + Take the buffer after a frame decode (strictly: it is the data from frame fr->num!) and cut samples out. + fr->buffer.fill may then be smaller than before... +*/ +static void frame_buffercheck(mpg123_handle *fr) +{ + /* When we have no accurate position, gapless code does not make sense. */ + if(!(fr->state_flags & FRAME_ACCURATE)) return; + + /* Get a grip on dirty streams that start with a gapless header. + Simply accept all data from frames that are too much, + they are supposedly attached to the stream after the fact. */ + if(fr->gapless_frames > 0 && fr->num >= fr->gapless_frames) return; + + /* Important: We first cut samples from the end, then cut from beginning (including left-shift of the buffer). + This order works also for the case where firstframe == lastframe. */ + + /* The last interesting (planned) frame: Only use some leading samples. + Note a difference from the below: The last frame and offset are unchanges by seeks. + The lastoff keeps being valid. */ + if(fr->lastframe > -1 && fr->num >= fr->lastframe) + { + /* There can be more than one frame of padding at the end, so we ignore the whole frame if we are beyond lastframe. */ + off_t byteoff = (fr->num == fr->lastframe) ? samples_to_bytes(fr, fr->lastoff) : 0; + if((off_t)fr->buffer.fill > byteoff) + { + fr->buffer.fill = byteoff; + } + if(VERBOSE3) fprintf(stderr, "\nNote: Cut frame %"OFF_P" buffer on end of stream to %"OFF_P" samples, fill now %"SIZE_P" bytes.\n", (off_p)fr->num, (off_p)(fr->num == fr->lastframe ? fr->lastoff : 0), (size_p)fr->buffer.fill); + } + + /* The first interesting frame: Skip some leading samples. */ + if(fr->firstoff && fr->num == fr->firstframe) + { + off_t byteoff = samples_to_bytes(fr, fr->firstoff); + if((off_t)fr->buffer.fill > byteoff) + { + fr->buffer.fill -= byteoff; + /* buffer.p != buffer.data only for own buffer */ + debug6("cutting %li samples/%li bytes on begin, own_buffer=%i at %p=%p, buf[1]=%i", + (long)fr->firstoff, (long)byteoff, fr->own_buffer, (void*)fr->buffer.p, (void*)fr->buffer.data, ((short*)fr->buffer.p)[2]); + if(fr->own_buffer) fr->buffer.p = fr->buffer.data + byteoff; + else memmove(fr->buffer.data, fr->buffer.data + byteoff, fr->buffer.fill); + debug3("done cutting, buffer at %p =? %p, buf[1]=%i", + (void*)fr->buffer.p, (void*)fr->buffer.data, ((short*)fr->buffer.p)[2]); + } + else fr->buffer.fill = 0; + + if(VERBOSE3) fprintf(stderr, "\nNote: Cut frame %"OFF_P" buffer on beginning of stream by %"OFF_P" samples, fill now %"SIZE_P" bytes.\n", (off_p)fr->num, (off_p)fr->firstoff, (size_p)fr->buffer.fill); + /* We can only reach this frame again by seeking. And on seeking, firstoff will be recomputed. + So it is safe to null it here (and it makes the if() decision abort earlier). */ + fr->firstoff = 0; + } +} + +#define SAMPLE_ADJUST(mh,x) sample_adjust(mh,x) +#define SAMPLE_UNADJUST(mh,x) sample_unadjust(mh,x) +#define FRAME_BUFFERCHECK(mh) frame_buffercheck(mh) + +#else /* no gapless code included */ + +#define SAMPLE_ADJUST(mh,x) (x) +#define SAMPLE_UNADJUST(mh,x) (x) +#define FRAME_BUFFERCHECK(mh) + +#endif diff --git a/deps/mpg123/src/libmpg123/getbits.h b/deps/mpg123/src/libmpg123/getbits.h new file mode 100644 index 0000000..8eff00e --- /dev/null +++ b/deps/mpg123/src/libmpg123/getbits.h @@ -0,0 +1,100 @@ +/* + getbits + + copyright ?-2009 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Michael Hipp + + All code is in the header to suggest/force inlining of these small often-used functions. + This indeed has some impact on performance. +*/ + +#ifndef _MPG123_GETBITS_H_ +#define _MPG123_GETBITS_H_ + +#include "mpg123lib_intern.h" + +#define backbits(fr,nob) ((void)( \ + fr->bitindex -= nob, \ + fr->wordpointer += (fr->bitindex>>3), \ + fr->bitindex &= 0x7 )) + +#define getbitoffset(fr) ((-fr->bitindex)&0x7) +#define getbyte(fr) (*fr->wordpointer++) + +/* There is something wrong with that macro... the function below works also for the layer1 test case. */ +#define macro_getbits(fr, nob) ( \ + fr->ultmp = fr->wordpointer[0],\ + fr->ultmp <<= 8, \ + fr->ultmp |= fr->wordpointer[1], \ + fr->ultmp <<= 8, \ + fr->ultmp |= fr->wordpointer[2], \ + fr->ultmp <<= fr->bitindex, \ + fr->ultmp &= 0xffffff, \ + fr->bitindex += nob, \ + fr->ultmp >>= (24-nob), \ + fr->wordpointer += (fr->bitindex>>3), \ + fr->bitindex &= 7, \ + fr->ultmp) + +static unsigned int getbits(mpg123_handle *fr, int number_of_bits) +{ + unsigned long rval; + +#ifdef DEBUG_GETBITS +fprintf(stderr,"g%d",number_of_bits); +#endif + +/* This is actually slow: if(!number_of_bits) + return 0; */ + +#if 0 + check_buffer_range(number_of_bits+fr->bitindex); +#endif + + { + rval = fr->wordpointer[0]; + rval <<= 8; + rval |= fr->wordpointer[1]; + rval <<= 8; + rval |= fr->wordpointer[2]; + + rval <<= fr->bitindex; + rval &= 0xffffff; + + fr->bitindex += number_of_bits; + + rval >>= (24-number_of_bits); + + fr->wordpointer += (fr->bitindex>>3); + fr->bitindex &= 7; + } + +#ifdef DEBUG_GETBITS +fprintf(stderr,":%lx\n",rval); +#endif + + return rval; +} + + +#define skipbits(fr, nob) fr->ultmp = ( \ + fr->ultmp = fr->wordpointer[0], fr->ultmp <<= 8, fr->ultmp |= fr->wordpointer[1], \ + fr->ultmp <<= 8, fr->ultmp |= fr->wordpointer[2], fr->ultmp <<= fr->bitindex, \ + fr->ultmp &= 0xffffff, fr->bitindex += nob, \ + fr->ultmp >>= (24-nob), fr->wordpointer += (fr->bitindex>>3), \ + fr->bitindex &= 7 ) + +#define getbits_fast(fr, nob) ( \ + fr->ultmp = (unsigned char) (fr->wordpointer[0] << fr->bitindex), \ + fr->ultmp |= ((unsigned long) fr->wordpointer[1]<bitindex)>>8, \ + fr->ultmp <<= nob, fr->ultmp >>= 8, \ + fr->bitindex += nob, fr->wordpointer += (fr->bitindex>>3), \ + fr->bitindex &= 7, fr->ultmp ) + +#define get1bit(fr) ( \ + fr->uctmp = *fr->wordpointer << fr->bitindex, fr->bitindex++, \ + fr->wordpointer += (fr->bitindex>>3), fr->bitindex &= 7, fr->uctmp>>7 ) + + +#endif diff --git a/deps/mpg123/src/libmpg123/getcpuflags.S b/deps/mpg123/src/libmpg123/getcpuflags.S new file mode 100644 index 0000000..89c0f45 --- /dev/null +++ b/deps/mpg123/src/libmpg123/getcpuflags.S @@ -0,0 +1,91 @@ +/* + getcpucpuflags: get cpuflags for ia32 + + copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http:#mpg123.org + initially written by KIMURA Takuhiro (for 3DNow!) + extended for general use by Thomas Orgis + + extern int getcpuid(struct cpuflags*) + or just + extern int getcpuid(unsigned int*) + where there is memory for 4 ints + -> the first set of idflags (basic cpu family info) + and the idflags, stdflags, std2flags, extflags written to the parameter + -> 0x00000000 (CPUID instruction not supported) +*/ + +#include "mangle.h" + +.text + ALIGN4 + +.globl ASM_NAME(getcpuflags) +/* .type ASM_NAME(getcpuflags),@function */ +ASM_NAME(getcpuflags): + pushl %ebp + movl %esp,%ebp + pushl %edx + pushl %ecx + pushl %ebx + pushl %esi +/* get the int pointer for storing the flags */ + movl 8(%ebp), %esi +/* does that one make sense? */ + movl $0x80000000,%eax +/* now save the flags and do a check for cpuid availability */ + pushfl + pushfl + popl %eax + movl %eax,%ebx +/* set that bit... */ + xorl $0x00200000,%eax + pushl %eax + popfl +/* ...and read back the flags to see if it is understood */ + pushfl + popl %eax + popfl + cmpl %ebx,%eax + je .Lnocpuid +/* In principle, I would have to check the CPU's identify first to be sure how to interpret the extended flags. */ +/* now get the info, first extended */ + movl $0x0, 12(%esi) /* clear value */ +/* only if supported... */ + movl $0x80000000, %eax + cpuid +/* IDT CPUs should not change EAX, generally I hope that non-3DNow cpus do not set a bogus support level here. */ + cmpl $0x80000001, %eax + jb .Lnoextended /* Skip ext check without minimal support level. */ +/* is supported, get flags value */ + movl $0x80000001,%eax + cpuid + movl %edx,12(%esi) +.Lnoextended: +/* then the other ones, called last to get the id flags in %eax for ret */ + movl $0x00000001,%eax + cpuid + movl %eax, (%esi) + movl %ecx, 4(%esi) + movl %edx, 8(%esi) + jmp .Lend + ALIGN4 +.Lnocpuid: +/* error: set everything to zero */ + movl $0, %eax + movl $0, (%esi) + movl $0, 4(%esi) + movl $0, 8(%esi) + movl $0, 12(%esi) + ALIGN4 +.Lend: +/* return value are the id flags, still stored in %eax */ + popl %esi + popl %ebx + popl %ecx + popl %edx + movl %ebp,%esp + popl %ebp + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/getcpuflags.h b/deps/mpg123/src/libmpg123/getcpuflags.h new file mode 100644 index 0000000..68dd975 --- /dev/null +++ b/deps/mpg123/src/libmpg123/getcpuflags.h @@ -0,0 +1,47 @@ +/* + getcpucpuflags: get cpuflags for ia32 + + copyright ?-2007 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http:#mpg123.org + initially written by KIMURA Takuhiro (for 3DNow!) + extended for general use by Thomas Orgis +*/ + +#ifndef MPG123_H_GETCPUFLAGS +#define MPG123_H_GETCPUFLAGS + +/* standard level flags part 1 (ECX)*/ +#define FLAG_SSE3 0x00000001 + +/* standard level flags part 2 (EDX) */ +#define FLAG2_MMX 0x00800000 +#define FLAG2_SSE 0x02000000 +#define FLAG2_SSE2 0x04000000 +#define FLAG2_FPU 0x00000001 +/* cpuid extended level 1 (AMD) */ +#define XFLAG_MMX 0x00800000 +#define XFLAG_3DNOW 0x80000000 +#define XFLAG_3DNOWEXT 0x40000000 + +struct cpuflags +{ + unsigned int id; + unsigned int std; + unsigned int std2; + unsigned int ext; +}; + +unsigned int getcpuflags(struct cpuflags* cf); + +/* checks the family */ +#define cpu_i586(s) ( ((s.id & 0xf00)>>8) == 0 || ((s.id & 0xf00)>>8) > 4 ) +/* checking some flags... */ +#define cpu_fpu(s) (FLAG2_FPU & s.std2) +#define cpu_mmx(s) (FLAG2_MMX & s.std2 || XFLAG_MMX & s.ext) +#define cpu_3dnow(s) (XFLAG_3DNOW & s.ext) +#define cpu_3dnowext(s) (XFLAG_3DNOWEXT & s.ext) +#define cpu_sse(s) (FLAG2_SSE & s.std2) +#define cpu_sse2(s) (FLAG2_SSE2 & s.std2) +#define cpu_sse3(s) (FLAG_SSE3 & s.std) + +#endif diff --git a/deps/mpg123/src/libmpg123/huffman.h b/deps/mpg123/src/libmpg123/huffman.h new file mode 100644 index 0000000..576fbd8 --- /dev/null +++ b/deps/mpg123/src/libmpg123/huffman.h @@ -0,0 +1,340 @@ +/* + huffman.h: huffman tables ... recalcualted to work with optimized decoder scheme (MH) + + copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Michael Hipp + + probably we could save a few bytes of memory, because the + smaller tables are often the part of a bigger table +*/ + + +#ifndef _MPG123_HUFFMAN_H_ +#define _MPG123_HUFFMAN_H_ + +struct newhuff +{ + unsigned int linbits; + const short *table; +}; + +static const short tab0[] = +{ + 0 +}; + +static const short tab1[] = +{ + -5, -3, -1, 17, 1, 16, 0 +}; + +static const short tab2[] = +{ + -15, -11, -9, -5, -3, -1, 34, 2, 18, -1, 33, 32, 17, -1, 1, + 16, 0 +}; + +static const short tab3[] = +{ + -13, -11, -9, -5, -3, -1, 34, 2, 18, -1, 33, 32, 16, 17, -1, + 1, 0 +}; + +static const short tab5[] = +{ + -29, -25, -23, -15, -7, -5, -3, -1, 51, 35, 50, 49, -3, -1, 19, + 3, -1, 48, 34, -3, -1, 18, 33, -1, 2, 32, 17, -1, 1, 16, + 0 +}; + +static const short tab6[] = +{ + -25, -19, -13, -9, -5, -3, -1, 51, 3, 35, -1, 50, 48, -1, 19, + 49, -3, -1, 34, 2, 18, -3, -1, 33, 32, 1, -1, 17, -1, 16, + 0 +}; + +static const short tab7[] = +{ + -69, -65, -57, -39, -29, -17, -11, -7, -3, -1, 85, 69, -1, 84, 83, + -1, 53, 68, -3, -1, 37, 82, 21, -5, -1, 81, -1, 5, 52, -1, + 80, -1, 67, 51, -5, -3, -1, 36, 66, 20, -1, 65, 64, -11, -7, + -3, -1, 4, 35, -1, 50, 3, -1, 19, 49, -3, -1, 48, 34, 18, + -5, -1, 33, -1, 2, 32, 17, -1, 1, 16, 0 +}; + +static const short tab8[] = +{ + -65, -63, -59, -45, -31, -19, -13, -7, -5, -3, -1, 85, 84, 69, 83, + -3, -1, 53, 68, 37, -3, -1, 82, 5, 21, -5, -1, 81, -1, 52, + 67, -3, -1, 80, 51, 36, -5, -3, -1, 66, 20, 65, -3, -1, 4, + 64, -1, 35, 50, -9, -7, -3, -1, 19, 49, -1, 3, 48, 34, -1, + 2, 32, -1, 18, 33, 17, -3, -1, 1, 16, 0 +}; + +static const short tab9[] = +{ + -63, -53, -41, -29, -19, -11, -5, -3, -1, 85, 69, 53, -1, 83, -1, + 84, 5, -3, -1, 68, 37, -1, 82, 21, -3, -1, 81, 52, -1, 67, + -1, 80, 4, -7, -3, -1, 36, 66, -1, 51, 64, -1, 20, 65, -5, + -3, -1, 35, 50, 19, -1, 49, -1, 3, 48, -5, -3, -1, 34, 2, + 18, -1, 33, 32, -3, -1, 17, 1, -1, 16, 0 +}; + +static const short tab10[] = +{ +-125,-121,-111, -83, -55, -35, -21, -13, -7, -3, -1, 119, 103, -1, 118, + 87, -3, -1, 117, 102, 71, -3, -1, 116, 86, -1, 101, 55, -9, -3, + -1, 115, 70, -3, -1, 85, 84, 99, -1, 39, 114, -11, -5, -3, -1, + 100, 7, 112, -1, 98, -1, 69, 53, -5, -1, 6, -1, 83, 68, 23, + -17, -5, -1, 113, -1, 54, 38, -5, -3, -1, 37, 82, 21, -1, 81, + -1, 52, 67, -3, -1, 22, 97, -1, 96, -1, 5, 80, -19, -11, -7, + -3, -1, 36, 66, -1, 51, 4, -1, 20, 65, -3, -1, 64, 35, -1, + 50, 3, -3, -1, 19, 49, -1, 48, 34, -7, -3, -1, 18, 33, -1, + 2, 32, 17, -1, 1, 16, 0 +}; + +static const short tab11[] = +{ +-121,-113, -89, -59, -43, -27, -17, -7, -3, -1, 119, 103, -1, 118, 117, + -3, -1, 102, 71, -1, 116, -1, 87, 85, -5, -3, -1, 86, 101, 55, + -1, 115, 70, -9, -7, -3, -1, 69, 84, -1, 53, 83, 39, -1, 114, + -1, 100, 7, -5, -1, 113, -1, 23, 112, -3, -1, 54, 99, -1, 96, + -1, 68, 37, -13, -7, -5, -3, -1, 82, 5, 21, 98, -3, -1, 38, + 6, 22, -5, -1, 97, -1, 81, 52, -5, -1, 80, -1, 67, 51, -1, + 36, 66, -15, -11, -7, -3, -1, 20, 65, -1, 4, 64, -1, 35, 50, + -1, 19, 49, -5, -3, -1, 3, 48, 34, 33, -5, -1, 18, -1, 2, + 32, 17, -3, -1, 1, 16, 0 +}; + +static const short tab12[] = +{ +-115, -99, -73, -45, -27, -17, -9, -5, -3, -1, 119, 103, 118, -1, 87, + 117, -3, -1, 102, 71, -1, 116, 101, -3, -1, 86, 55, -3, -1, 115, + 85, 39, -7, -3, -1, 114, 70, -1, 100, 23, -5, -1, 113, -1, 7, + 112, -1, 54, 99, -13, -9, -3, -1, 69, 84, -1, 68, -1, 6, 5, + -1, 38, 98, -5, -1, 97, -1, 22, 96, -3, -1, 53, 83, -1, 37, + 82, -17, -7, -3, -1, 21, 81, -1, 52, 67, -5, -3, -1, 80, 4, + 36, -1, 66, 20, -3, -1, 51, 65, -1, 35, 50, -11, -7, -5, -3, + -1, 64, 3, 48, 19, -1, 49, 34, -1, 18, 33, -7, -5, -3, -1, + 2, 32, 0, 17, -1, 1, 16 +}; + +static const short tab13[] = +{ +-509,-503,-475,-405,-333,-265,-205,-153,-115, -83, -53, -35, -21, -13, -9, + -7, -5, -3, -1, 254, 252, 253, 237, 255, -1, 239, 223, -3, -1, 238, + 207, -1, 222, 191, -9, -3, -1, 251, 206, -1, 220, -1, 175, 233, -1, + 236, 221, -9, -5, -3, -1, 250, 205, 190, -1, 235, 159, -3, -1, 249, + 234, -1, 189, 219, -17, -9, -3, -1, 143, 248, -1, 204, -1, 174, 158, + -5, -1, 142, -1, 127, 126, 247, -5, -1, 218, -1, 173, 188, -3, -1, + 203, 246, 111, -15, -7, -3, -1, 232, 95, -1, 157, 217, -3, -1, 245, + 231, -1, 172, 187, -9, -3, -1, 79, 244, -3, -1, 202, 230, 243, -1, + 63, -1, 141, 216, -21, -9, -3, -1, 47, 242, -3, -1, 110, 156, 15, + -5, -3, -1, 201, 94, 171, -3, -1, 125, 215, 78, -11, -5, -3, -1, + 200, 214, 62, -1, 185, -1, 155, 170, -1, 31, 241, -23, -13, -5, -1, + 240, -1, 186, 229, -3, -1, 228, 140, -1, 109, 227, -5, -1, 226, -1, + 46, 14, -1, 30, 225, -15, -7, -3, -1, 224, 93, -1, 213, 124, -3, + -1, 199, 77, -1, 139, 184, -7, -3, -1, 212, 154, -1, 169, 108, -1, + 198, 61, -37, -21, -9, -5, -3, -1, 211, 123, 45, -1, 210, 29, -5, + -1, 183, -1, 92, 197, -3, -1, 153, 122, 195, -7, -5, -3, -1, 167, + 151, 75, 209, -3, -1, 13, 208, -1, 138, 168, -11, -7, -3, -1, 76, + 196, -1, 107, 182, -1, 60, 44, -3, -1, 194, 91, -3, -1, 181, 137, + 28, -43, -23, -11, -5, -1, 193, -1, 152, 12, -1, 192, -1, 180, 106, + -5, -3, -1, 166, 121, 59, -1, 179, -1, 136, 90, -11, -5, -1, 43, + -1, 165, 105, -1, 164, -1, 120, 135, -5, -1, 148, -1, 119, 118, 178, + -11, -3, -1, 27, 177, -3, -1, 11, 176, -1, 150, 74, -7, -3, -1, + 58, 163, -1, 89, 149, -1, 42, 162, -47, -23, -9, -3, -1, 26, 161, + -3, -1, 10, 104, 160, -5, -3, -1, 134, 73, 147, -3, -1, 57, 88, + -1, 133, 103, -9, -3, -1, 41, 146, -3, -1, 87, 117, 56, -5, -1, + 131, -1, 102, 71, -3, -1, 116, 86, -1, 101, 115, -11, -3, -1, 25, + 145, -3, -1, 9, 144, -1, 72, 132, -7, -5, -1, 114, -1, 70, 100, + 40, -1, 130, 24, -41, -27, -11, -5, -3, -1, 55, 39, 23, -1, 113, + -1, 85, 7, -7, -3, -1, 112, 54, -1, 99, 69, -3, -1, 84, 38, + -1, 98, 53, -5, -1, 129, -1, 8, 128, -3, -1, 22, 97, -1, 6, + 96, -13, -9, -5, -3, -1, 83, 68, 37, -1, 82, 5, -1, 21, 81, + -7, -3, -1, 52, 67, -1, 80, 36, -3, -1, 66, 51, 20, -19, -11, + -5, -1, 65, -1, 4, 64, -3, -1, 35, 50, 19, -3, -1, 49, 3, + -1, 48, 34, -3, -1, 18, 33, -1, 2, 32, -3, -1, 17, 1, 16, + 0 +}; + +static const short tab15[] = +{ +-495,-445,-355,-263,-183,-115, -77, -43, -27, -13, -7, -3, -1, 255, 239, + -1, 254, 223, -1, 238, -1, 253, 207, -7, -3, -1, 252, 222, -1, 237, + 191, -1, 251, -1, 206, 236, -7, -3, -1, 221, 175, -1, 250, 190, -3, + -1, 235, 205, -1, 220, 159, -15, -7, -3, -1, 249, 234, -1, 189, 219, + -3, -1, 143, 248, -1, 204, 158, -7, -3, -1, 233, 127, -1, 247, 173, + -3, -1, 218, 188, -1, 111, -1, 174, 15, -19, -11, -3, -1, 203, 246, + -3, -1, 142, 232, -1, 95, 157, -3, -1, 245, 126, -1, 231, 172, -9, + -3, -1, 202, 187, -3, -1, 217, 141, 79, -3, -1, 244, 63, -1, 243, + 216, -33, -17, -9, -3, -1, 230, 47, -1, 242, -1, 110, 240, -3, -1, + 31, 241, -1, 156, 201, -7, -3, -1, 94, 171, -1, 186, 229, -3, -1, + 125, 215, -1, 78, 228, -15, -7, -3, -1, 140, 200, -1, 62, 109, -3, + -1, 214, 227, -1, 155, 185, -7, -3, -1, 46, 170, -1, 226, 30, -5, + -1, 225, -1, 14, 224, -1, 93, 213, -45, -25, -13, -7, -3, -1, 124, + 199, -1, 77, 139, -1, 212, -1, 184, 154, -7, -3, -1, 169, 108, -1, + 198, 61, -1, 211, 210, -9, -5, -3, -1, 45, 13, 29, -1, 123, 183, + -5, -1, 209, -1, 92, 208, -1, 197, 138, -17, -7, -3, -1, 168, 76, + -1, 196, 107, -5, -1, 182, -1, 153, 12, -1, 60, 195, -9, -3, -1, + 122, 167, -1, 166, -1, 192, 11, -1, 194, -1, 44, 91, -55, -29, -15, + -7, -3, -1, 181, 28, -1, 137, 152, -3, -1, 193, 75, -1, 180, 106, + -5, -3, -1, 59, 121, 179, -3, -1, 151, 136, -1, 43, 90, -11, -5, + -1, 178, -1, 165, 27, -1, 177, -1, 176, 105, -7, -3, -1, 150, 74, + -1, 164, 120, -3, -1, 135, 58, 163, -17, -7, -3, -1, 89, 149, -1, + 42, 162, -3, -1, 26, 161, -3, -1, 10, 160, 104, -7, -3, -1, 134, + 73, -1, 148, 57, -5, -1, 147, -1, 119, 9, -1, 88, 133, -53, -29, + -13, -7, -3, -1, 41, 103, -1, 118, 146, -1, 145, -1, 25, 144, -7, + -3, -1, 72, 132, -1, 87, 117, -3, -1, 56, 131, -1, 102, 71, -7, + -3, -1, 40, 130, -1, 24, 129, -7, -3, -1, 116, 8, -1, 128, 86, + -3, -1, 101, 55, -1, 115, 70, -17, -7, -3, -1, 39, 114, -1, 100, + 23, -3, -1, 85, 113, -3, -1, 7, 112, 54, -7, -3, -1, 99, 69, + -1, 84, 38, -3, -1, 98, 22, -3, -1, 6, 96, 53, -33, -19, -9, + -5, -1, 97, -1, 83, 68, -1, 37, 82, -3, -1, 21, 81, -3, -1, + 5, 80, 52, -7, -3, -1, 67, 36, -1, 66, 51, -1, 65, -1, 20, + 4, -9, -3, -1, 35, 50, -3, -1, 64, 3, 19, -3, -1, 49, 48, + 34, -9, -7, -3, -1, 18, 33, -1, 2, 32, 17, -3, -1, 1, 16, + 0 +}; + +static const short tab16[] = +{ +-509,-503,-461,-323,-103, -37, -27, -15, -7, -3, -1, 239, 254, -1, 223, + 253, -3, -1, 207, 252, -1, 191, 251, -5, -1, 175, -1, 250, 159, -3, + -1, 249, 248, 143, -7, -3, -1, 127, 247, -1, 111, 246, 255, -9, -5, + -3, -1, 95, 245, 79, -1, 244, 243, -53, -1, 240, -1, 63, -29, -19, + -13, -7, -5, -1, 206, -1, 236, 221, 222, -1, 233, -1, 234, 217, -1, + 238, -1, 237, 235, -3, -1, 190, 205, -3, -1, 220, 219, 174, -11, -5, + -1, 204, -1, 173, 218, -3, -1, 126, 172, 202, -5, -3, -1, 201, 125, + 94, 189, 242, -93, -5, -3, -1, 47, 15, 31, -1, 241, -49, -25, -13, + -5, -1, 158, -1, 188, 203, -3, -1, 142, 232, -1, 157, 231, -7, -3, + -1, 187, 141, -1, 216, 110, -1, 230, 156, -13, -7, -3, -1, 171, 186, + -1, 229, 215, -1, 78, -1, 228, 140, -3, -1, 200, 62, -1, 109, -1, + 214, 155, -19, -11, -5, -3, -1, 185, 170, 225, -1, 212, -1, 184, 169, + -5, -1, 123, -1, 183, 208, 227, -7, -3, -1, 14, 224, -1, 93, 213, + -3, -1, 124, 199, -1, 77, 139, -75, -45, -27, -13, -7, -3, -1, 154, + 108, -1, 198, 61, -3, -1, 92, 197, 13, -7, -3, -1, 138, 168, -1, + 153, 76, -3, -1, 182, 122, 60, -11, -5, -3, -1, 91, 137, 28, -1, + 192, -1, 152, 121, -1, 226, -1, 46, 30, -15, -7, -3, -1, 211, 45, + -1, 210, 209, -5, -1, 59, -1, 151, 136, 29, -7, -3, -1, 196, 107, + -1, 195, 167, -1, 44, -1, 194, 181, -23, -13, -7, -3, -1, 193, 12, + -1, 75, 180, -3, -1, 106, 166, 179, -5, -3, -1, 90, 165, 43, -1, + 178, 27, -13, -5, -1, 177, -1, 11, 176, -3, -1, 105, 150, -1, 74, + 164, -5, -3, -1, 120, 135, 163, -3, -1, 58, 89, 42, -97, -57, -33, + -19, -11, -5, -3, -1, 149, 104, 161, -3, -1, 134, 119, 148, -5, -3, + -1, 73, 87, 103, 162, -5, -1, 26, -1, 10, 160, -3, -1, 57, 147, + -1, 88, 133, -9, -3, -1, 41, 146, -3, -1, 118, 9, 25, -5, -1, + 145, -1, 144, 72, -3, -1, 132, 117, -1, 56, 131, -21, -11, -5, -3, + -1, 102, 40, 130, -3, -1, 71, 116, 24, -3, -1, 129, 128, -3, -1, + 8, 86, 55, -9, -5, -1, 115, -1, 101, 70, -1, 39, 114, -5, -3, + -1, 100, 85, 7, 23, -23, -13, -5, -1, 113, -1, 112, 54, -3, -1, + 99, 69, -1, 84, 38, -3, -1, 98, 22, -1, 97, -1, 6, 96, -9, + -5, -1, 83, -1, 53, 68, -1, 37, 82, -1, 81, -1, 21, 5, -33, + -23, -13, -7, -3, -1, 52, 67, -1, 80, 36, -3, -1, 66, 51, 20, + -5, -1, 65, -1, 4, 64, -1, 35, 50, -3, -1, 19, 49, -3, -1, + 3, 48, 34, -3, -1, 18, 33, -1, 2, 32, -3, -1, 17, 1, 16, + 0 +}; + +static const short tab24[] = +{ +-451,-117, -43, -25, -15, -7, -3, -1, 239, 254, -1, 223, 253, -3, -1, + 207, 252, -1, 191, 251, -5, -1, 250, -1, 175, 159, -1, 249, 248, -9, + -5, -3, -1, 143, 127, 247, -1, 111, 246, -3, -1, 95, 245, -1, 79, + 244, -71, -7, -3, -1, 63, 243, -1, 47, 242, -5, -1, 241, -1, 31, + 240, -25, -9, -1, 15, -3, -1, 238, 222, -1, 237, 206, -7, -3, -1, + 236, 221, -1, 190, 235, -3, -1, 205, 220, -1, 174, 234, -15, -7, -3, + -1, 189, 219, -1, 204, 158, -3, -1, 233, 173, -1, 218, 188, -7, -3, + -1, 203, 142, -1, 232, 157, -3, -1, 217, 126, -1, 231, 172, 255,-235, +-143, -77, -45, -25, -15, -7, -3, -1, 202, 187, -1, 141, 216, -5, -3, + -1, 14, 224, 13, 230, -5, -3, -1, 110, 156, 201, -1, 94, 186, -9, + -5, -1, 229, -1, 171, 125, -1, 215, 228, -3, -1, 140, 200, -3, -1, + 78, 46, 62, -15, -7, -3, -1, 109, 214, -1, 227, 155, -3, -1, 185, + 170, -1, 226, 30, -7, -3, -1, 225, 93, -1, 213, 124, -3, -1, 199, + 77, -1, 139, 184, -31, -15, -7, -3, -1, 212, 154, -1, 169, 108, -3, + -1, 198, 61, -1, 211, 45, -7, -3, -1, 210, 29, -1, 123, 183, -3, + -1, 209, 92, -1, 197, 138, -17, -7, -3, -1, 168, 153, -1, 76, 196, + -3, -1, 107, 182, -3, -1, 208, 12, 60, -7, -3, -1, 195, 122, -1, + 167, 44, -3, -1, 194, 91, -1, 181, 28, -57, -35, -19, -7, -3, -1, + 137, 152, -1, 193, 75, -5, -3, -1, 192, 11, 59, -3, -1, 176, 10, + 26, -5, -1, 180, -1, 106, 166, -3, -1, 121, 151, -3, -1, 160, 9, + 144, -9, -3, -1, 179, 136, -3, -1, 43, 90, 178, -7, -3, -1, 165, + 27, -1, 177, 105, -1, 150, 164, -17, -9, -5, -3, -1, 74, 120, 135, + -1, 58, 163, -3, -1, 89, 149, -1, 42, 162, -7, -3, -1, 161, 104, + -1, 134, 119, -3, -1, 73, 148, -1, 57, 147, -63, -31, -15, -7, -3, + -1, 88, 133, -1, 41, 103, -3, -1, 118, 146, -1, 25, 145, -7, -3, + -1, 72, 132, -1, 87, 117, -3, -1, 56, 131, -1, 102, 40, -17, -7, + -3, -1, 130, 24, -1, 71, 116, -5, -1, 129, -1, 8, 128, -1, 86, + 101, -7, -5, -1, 23, -1, 7, 112, 115, -3, -1, 55, 39, 114, -15, + -7, -3, -1, 70, 100, -1, 85, 113, -3, -1, 54, 99, -1, 69, 84, + -7, -3, -1, 38, 98, -1, 22, 97, -5, -3, -1, 6, 96, 53, -1, + 83, 68, -51, -37, -23, -15, -9, -3, -1, 37, 82, -1, 21, -1, 5, + 80, -1, 81, -1, 52, 67, -3, -1, 36, 66, -1, 51, 20, -9, -5, + -1, 65, -1, 4, 64, -1, 35, 50, -1, 19, 49, -7, -5, -3, -1, + 3, 48, 34, 18, -1, 33, -1, 2, 32, -3, -1, 17, 1, -1, 16, + 0 +}; + +static const short tab_c0[] = +{ + -29, -21, -13, -7, -3, -1, 11, 15, -1, 13, 14, -3, -1, 7, 5, + 9, -3, -1, 6, 3, -1, 10, 12, -3, -1, 2, 1, -1, 4, 8, + 0 +}; + +static const short tab_c1[] = +{ + -15, -7, -3, -1, 15, 14, -1, 13, 12, -3, -1, 11, 10, -1, 9, + 8, -7, -3, -1, 7, 6, -1, 5, 4, -3, -1, 3, 2, -1, 1, + 0 +}; + + + +static const struct newhuff ht[] = +{ + { /* 0 */ 0 , tab0 } , + { /* 2 */ 0 , tab1 } , + { /* 3 */ 0 , tab2 } , + { /* 3 */ 0 , tab3 } , + { /* 0 */ 0 , tab0 } , + { /* 4 */ 0 , tab5 } , + { /* 4 */ 0 , tab6 } , + { /* 6 */ 0 , tab7 } , + { /* 6 */ 0 , tab8 } , + { /* 6 */ 0 , tab9 } , + { /* 8 */ 0 , tab10 } , + { /* 8 */ 0 , tab11 } , + { /* 8 */ 0 , tab12 } , + { /* 16 */ 0 , tab13 } , + { /* 0 */ 0 , tab0 } , + { /* 16 */ 0 , tab15 } , + + { /* 16 */ 1 , tab16 } , + { /* 16 */ 2 , tab16 } , + { /* 16 */ 3 , tab16 } , + { /* 16 */ 4 , tab16 } , + { /* 16 */ 6 , tab16 } , + { /* 16 */ 8 , tab16 } , + { /* 16 */ 10, tab16 } , + { /* 16 */ 13, tab16 } , + { /* 16 */ 4 , tab24 } , + { /* 16 */ 5 , tab24 } , + { /* 16 */ 6 , tab24 } , + { /* 16 */ 7 , tab24 } , + { /* 16 */ 8 , tab24 } , + { /* 16 */ 9 , tab24 } , + { /* 16 */ 11, tab24 } , + { /* 16 */ 13, tab24 } +}; + +static const struct newhuff htc[] = +{ + { /* 1 , 1 , */ 0 , tab_c0 } , + { /* 1 , 1 , */ 0 , tab_c1 } +}; + + +#endif diff --git a/deps/mpg123/src/libmpg123/icy.c b/deps/mpg123/src/libmpg123/icy.c new file mode 100644 index 0000000..dca2c5d --- /dev/null +++ b/deps/mpg123/src/libmpg123/icy.c @@ -0,0 +1,32 @@ +/* + icy: Puny code to pretend for a serious ICY data structure. + + copyright 2007 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Thomas Orgis +*/ + +#include "icy.h" + +void init_icy(struct icy_meta *icy) +{ + icy->data = NULL; +} + +void clear_icy(struct icy_meta *icy) +{ + if(icy->data != NULL) free(icy->data); + init_icy(icy); +} + +void reset_icy(struct icy_meta *icy) +{ + clear_icy(icy); + init_icy(icy); +} +/*void set_icy(struct icy_meta *icy, char* new_data) +{ + if(icy->data) free(icy->data); + icy->data = new_data; + icy->changed = 1; +}*/ diff --git a/deps/mpg123/src/libmpg123/icy.h b/deps/mpg123/src/libmpg123/icy.h new file mode 100644 index 0000000..a5fd64e --- /dev/null +++ b/deps/mpg123/src/libmpg123/icy.h @@ -0,0 +1,38 @@ +/* + icy: support for SHOUTcast ICY meta info, an attempt to keep it organized + + copyright 2006-7 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Thomas Orgis and modelled after patch by Honza +*/ +#ifndef MPG123_ICY_H +#define MPG123_ICY_H + +#ifndef NO_ICY + +#include "compat.h" +#include "mpg123.h" + +struct icy_meta +{ + char* data; + off_t interval; + off_t next; +}; + +void init_icy(struct icy_meta *); +void clear_icy(struct icy_meta *); +void reset_icy(struct icy_meta *); + +#else + +#undef init_icy +#define init_icy(a) +#undef clear_icy +#define clear_icy(a) +#undef reset_icy +#define reset_icy(a) + +#endif /* NO_ICY */ + +#endif diff --git a/deps/mpg123/src/libmpg123/icy2utf8.c b/deps/mpg123/src/libmpg123/icy2utf8.c new file mode 100644 index 0000000..4e72162 --- /dev/null +++ b/deps/mpg123/src/libmpg123/icy2utf8.c @@ -0,0 +1,438 @@ +/* mpg123 note: This is BSD-licensed code that is no problem for mpg123 usage under LGPL. + It's Free, understood? ;-) */ + +/* Another note: This code is basically written by Thorsten Glaser, + Thomas Orgis did just some rearrangements and comments. */ + +/*- + * Copyright (c) 2008 + * Thorsten Glaser + * + * Provided that these terms and disclaimer and all copyright notices + * are retained or reproduced in an accompanying document, permission + * is granted to deal in this work without restriction, including un- + * limited rights to use, publicly perform, distribute, sell, modify, + * merge, give away, or sublicence. + * + * This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to + * the utmost extent permitted by applicable law, neither express nor + * implied; without malicious intent or gross negligence. In no event + * may a licensor, author or contributor be held liable for indirect, + * direct, other damage, loss, or other issues arising in any way out + * of dealing in the work, even if advised of the possibility of such + * damage or existence of a defect, except proven that it results out + * of said person's immediate fault when using the work as intended. + *- + * Convert from ICY encoding (windows-1252 codepage) to UTF-8 + */ + +/* Includes string and stdlib headers... */ +#include "compat.h" + +/* ThOr: too lazy for this type check; also we use char/short all around anyway. + Of cource, it would be the proper way to use _these_ kind of types all around. */ +#define uint8_t unsigned char +#define uint16_t unsigned short + +static const uint8_t cp1252_utf8[] = { + /* 0x00 @ 0 */ 0x00, + /* 0x01 @ 1 */ 0x01, + /* 0x02 @ 2 */ 0x02, + /* 0x03 @ 3 */ 0x03, + /* 0x04 @ 4 */ 0x04, + /* 0x05 @ 5 */ 0x05, + /* 0x06 @ 6 */ 0x06, + /* 0x07 @ 7 */ 0x07, + /* 0x08 @ 8 */ 0x08, + /* 0x09 @ 9 */ 0x09, + /* 0x0A @ 10 */ 0x0A, + /* 0x0B @ 11 */ 0x0B, + /* 0x0C @ 12 */ 0x0C, + /* 0x0D @ 13 */ 0x0D, + /* 0x0E @ 14 */ 0x0E, + /* 0x0F @ 15 */ 0x0F, + /* 0x10 @ 16 */ 0x10, + /* 0x11 @ 17 */ 0x11, + /* 0x12 @ 18 */ 0x12, + /* 0x13 @ 19 */ 0x13, + /* 0x14 @ 20 */ 0x14, + /* 0x15 @ 21 */ 0x15, + /* 0x16 @ 22 */ 0x16, + /* 0x17 @ 23 */ 0x17, + /* 0x18 @ 24 */ 0x18, + /* 0x19 @ 25 */ 0x19, + /* 0x1A @ 26 */ 0x1A, + /* 0x1B @ 27 */ 0x1B, + /* 0x1C @ 28 */ 0x1C, + /* 0x1D @ 29 */ 0x1D, + /* 0x1E @ 30 */ 0x1E, + /* 0x1F @ 31 */ 0x1F, + /* 0x20 @ 32 */ 0x20, + /* 0x21 @ 33 */ 0x21, + /* 0x22 @ 34 */ 0x22, + /* 0x23 @ 35 */ 0x23, + /* 0x24 @ 36 */ 0x24, + /* 0x25 @ 37 */ 0x25, + /* 0x26 @ 38 */ 0x26, + /* 0x27 @ 39 */ 0x27, + /* 0x28 @ 40 */ 0x28, + /* 0x29 @ 41 */ 0x29, + /* 0x2A @ 42 */ 0x2A, + /* 0x2B @ 43 */ 0x2B, + /* 0x2C @ 44 */ 0x2C, + /* 0x2D @ 45 */ 0x2D, + /* 0x2E @ 46 */ 0x2E, + /* 0x2F @ 47 */ 0x2F, + /* 0x30 @ 48 */ 0x30, + /* 0x31 @ 49 */ 0x31, + /* 0x32 @ 50 */ 0x32, + /* 0x33 @ 51 */ 0x33, + /* 0x34 @ 52 */ 0x34, + /* 0x35 @ 53 */ 0x35, + /* 0x36 @ 54 */ 0x36, + /* 0x37 @ 55 */ 0x37, + /* 0x38 @ 56 */ 0x38, + /* 0x39 @ 57 */ 0x39, + /* 0x3A @ 58 */ 0x3A, + /* 0x3B @ 59 */ 0x3B, + /* 0x3C @ 60 */ 0x3C, + /* 0x3D @ 61 */ 0x3D, + /* 0x3E @ 62 */ 0x3E, + /* 0x3F @ 63 */ 0x3F, + /* 0x40 @ 64 */ 0x40, + /* 0x41 @ 65 */ 0x41, + /* 0x42 @ 66 */ 0x42, + /* 0x43 @ 67 */ 0x43, + /* 0x44 @ 68 */ 0x44, + /* 0x45 @ 69 */ 0x45, + /* 0x46 @ 70 */ 0x46, + /* 0x47 @ 71 */ 0x47, + /* 0x48 @ 72 */ 0x48, + /* 0x49 @ 73 */ 0x49, + /* 0x4A @ 74 */ 0x4A, + /* 0x4B @ 75 */ 0x4B, + /* 0x4C @ 76 */ 0x4C, + /* 0x4D @ 77 */ 0x4D, + /* 0x4E @ 78 */ 0x4E, + /* 0x4F @ 79 */ 0x4F, + /* 0x50 @ 80 */ 0x50, + /* 0x51 @ 81 */ 0x51, + /* 0x52 @ 82 */ 0x52, + /* 0x53 @ 83 */ 0x53, + /* 0x54 @ 84 */ 0x54, + /* 0x55 @ 85 */ 0x55, + /* 0x56 @ 86 */ 0x56, + /* 0x57 @ 87 */ 0x57, + /* 0x58 @ 88 */ 0x58, + /* 0x59 @ 89 */ 0x59, + /* 0x5A @ 90 */ 0x5A, + /* 0x5B @ 91 */ 0x5B, + /* 0x5C @ 92 */ 0x5C, + /* 0x5D @ 93 */ 0x5D, + /* 0x5E @ 94 */ 0x5E, + /* 0x5F @ 95 */ 0x5F, + /* 0x60 @ 96 */ 0x60, + /* 0x61 @ 97 */ 0x61, + /* 0x62 @ 98 */ 0x62, + /* 0x63 @ 99 */ 0x63, + /* 0x64 @ 100 */ 0x64, + /* 0x65 @ 101 */ 0x65, + /* 0x66 @ 102 */ 0x66, + /* 0x67 @ 103 */ 0x67, + /* 0x68 @ 104 */ 0x68, + /* 0x69 @ 105 */ 0x69, + /* 0x6A @ 106 */ 0x6A, + /* 0x6B @ 107 */ 0x6B, + /* 0x6C @ 108 */ 0x6C, + /* 0x6D @ 109 */ 0x6D, + /* 0x6E @ 110 */ 0x6E, + /* 0x6F @ 111 */ 0x6F, + /* 0x70 @ 112 */ 0x70, + /* 0x71 @ 113 */ 0x71, + /* 0x72 @ 114 */ 0x72, + /* 0x73 @ 115 */ 0x73, + /* 0x74 @ 116 */ 0x74, + /* 0x75 @ 117 */ 0x75, + /* 0x76 @ 118 */ 0x76, + /* 0x77 @ 119 */ 0x77, + /* 0x78 @ 120 */ 0x78, + /* 0x79 @ 121 */ 0x79, + /* 0x7A @ 122 */ 0x7A, + /* 0x7B @ 123 */ 0x7B, + /* 0x7C @ 124 */ 0x7C, + /* 0x7D @ 125 */ 0x7D, + /* 0x7E @ 126 */ 0x7E, + /* 0x7F @ 127 */ 0x7F, + /* 0x80 @ 128 */ 0xE2, 0x82, 0xAC, + /* 0x81 @ 131 */ 0xEF, 0xBF, 0xBD, + /* 0x82 @ 134 */ 0xE2, 0x80, 0x9A, + /* 0x83 @ 137 */ 0xC6, 0x92, + /* 0x84 @ 139 */ 0xE2, 0x80, 0x9E, + /* 0x85 @ 142 */ 0xE2, 0x80, 0xA6, + /* 0x86 @ 145 */ 0xE2, 0x80, 0xA0, + /* 0x87 @ 148 */ 0xE2, 0x80, 0xA1, + /* 0x88 @ 151 */ 0xCB, 0x86, + /* 0x89 @ 153 */ 0xE2, 0x80, 0xB0, + /* 0x8A @ 156 */ 0xC5, 0xA0, + /* 0x8B @ 158 */ 0xE2, 0x80, 0xB9, + /* 0x8C @ 161 */ 0xC5, 0x92, + /* 0x8D @ 163 */ 0xEF, 0xBF, 0xBD, + /* 0x8E @ 166 */ 0xC5, 0xBD, + /* 0x8F @ 168 */ 0xEF, 0xBF, 0xBD, + /* 0x90 @ 171 */ 0xEF, 0xBF, 0xBD, + /* 0x91 @ 174 */ 0xE2, 0x80, 0x98, + /* 0x92 @ 177 */ 0xE2, 0x80, 0x99, + /* 0x93 @ 180 */ 0xE2, 0x80, 0x9C, + /* 0x94 @ 183 */ 0xE2, 0x80, 0x9D, + /* 0x95 @ 186 */ 0xE2, 0x80, 0xA2, + /* 0x96 @ 189 */ 0xE2, 0x80, 0x93, + /* 0x97 @ 192 */ 0xE2, 0x80, 0x94, + /* 0x98 @ 195 */ 0xCB, 0x9C, + /* 0x99 @ 197 */ 0xE2, 0x84, 0xA2, + /* 0x9A @ 200 */ 0xC5, 0xA1, + /* 0x9B @ 202 */ 0xE2, 0x80, 0xBA, + /* 0x9C @ 205 */ 0xC5, 0x93, + /* 0x9D @ 207 */ 0xEF, 0xBF, 0xBD, + /* 0x9E @ 210 */ 0xC5, 0xBE, + /* 0x9F @ 212 */ 0xC5, 0xB8, + /* 0xA0 @ 214 */ 0xC2, 0xA0, + /* 0xA1 @ 216 */ 0xC2, 0xA1, + /* 0xA2 @ 218 */ 0xC2, 0xA2, + /* 0xA3 @ 220 */ 0xC2, 0xA3, + /* 0xA4 @ 222 */ 0xC2, 0xA4, + /* 0xA5 @ 224 */ 0xC2, 0xA5, + /* 0xA6 @ 226 */ 0xC2, 0xA6, + /* 0xA7 @ 228 */ 0xC2, 0xA7, + /* 0xA8 @ 230 */ 0xC2, 0xA8, + /* 0xA9 @ 232 */ 0xC2, 0xA9, + /* 0xAA @ 234 */ 0xC2, 0xAA, + /* 0xAB @ 236 */ 0xC2, 0xAB, + /* 0xAC @ 238 */ 0xC2, 0xAC, + /* 0xAD @ 240 */ 0xC2, 0xAD, + /* 0xAE @ 242 */ 0xC2, 0xAE, + /* 0xAF @ 244 */ 0xC2, 0xAF, + /* 0xB0 @ 246 */ 0xC2, 0xB0, + /* 0xB1 @ 248 */ 0xC2, 0xB1, + /* 0xB2 @ 250 */ 0xC2, 0xB2, + /* 0xB3 @ 252 */ 0xC2, 0xB3, + /* 0xB4 @ 254 */ 0xC2, 0xB4, + /* 0xB5 @ 256 */ 0xC2, 0xB5, + /* 0xB6 @ 258 */ 0xC2, 0xB6, + /* 0xB7 @ 260 */ 0xC2, 0xB7, + /* 0xB8 @ 262 */ 0xC2, 0xB8, + /* 0xB9 @ 264 */ 0xC2, 0xB9, + /* 0xBA @ 266 */ 0xC2, 0xBA, + /* 0xBB @ 268 */ 0xC2, 0xBB, + /* 0xBC @ 270 */ 0xC2, 0xBC, + /* 0xBD @ 272 */ 0xC2, 0xBD, + /* 0xBE @ 274 */ 0xC2, 0xBE, + /* 0xBF @ 276 */ 0xC2, 0xBF, + /* 0xC0 @ 278 */ 0xC3, 0x80, + /* 0xC1 @ 280 */ 0xC3, 0x81, + /* 0xC2 @ 282 */ 0xC3, 0x82, + /* 0xC3 @ 284 */ 0xC3, 0x83, + /* 0xC4 @ 286 */ 0xC3, 0x84, + /* 0xC5 @ 288 */ 0xC3, 0x85, + /* 0xC6 @ 290 */ 0xC3, 0x86, + /* 0xC7 @ 292 */ 0xC3, 0x87, + /* 0xC8 @ 294 */ 0xC3, 0x88, + /* 0xC9 @ 296 */ 0xC3, 0x89, + /* 0xCA @ 298 */ 0xC3, 0x8A, + /* 0xCB @ 300 */ 0xC3, 0x8B, + /* 0xCC @ 302 */ 0xC3, 0x8C, + /* 0xCD @ 304 */ 0xC3, 0x8D, + /* 0xCE @ 306 */ 0xC3, 0x8E, + /* 0xCF @ 308 */ 0xC3, 0x8F, + /* 0xD0 @ 310 */ 0xC3, 0x90, + /* 0xD1 @ 312 */ 0xC3, 0x91, + /* 0xD2 @ 314 */ 0xC3, 0x92, + /* 0xD3 @ 316 */ 0xC3, 0x93, + /* 0xD4 @ 318 */ 0xC3, 0x94, + /* 0xD5 @ 320 */ 0xC3, 0x95, + /* 0xD6 @ 322 */ 0xC3, 0x96, + /* 0xD7 @ 324 */ 0xC3, 0x97, + /* 0xD8 @ 326 */ 0xC3, 0x98, + /* 0xD9 @ 328 */ 0xC3, 0x99, + /* 0xDA @ 330 */ 0xC3, 0x9A, + /* 0xDB @ 332 */ 0xC3, 0x9B, + /* 0xDC @ 334 */ 0xC3, 0x9C, + /* 0xDD @ 336 */ 0xC3, 0x9D, + /* 0xDE @ 338 */ 0xC3, 0x9E, + /* 0xDF @ 340 */ 0xC3, 0x9F, + /* 0xE0 @ 342 */ 0xC3, 0xA0, + /* 0xE1 @ 344 */ 0xC3, 0xA1, + /* 0xE2 @ 346 */ 0xC3, 0xA2, + /* 0xE3 @ 348 */ 0xC3, 0xA3, + /* 0xE4 @ 350 */ 0xC3, 0xA4, + /* 0xE5 @ 352 */ 0xC3, 0xA5, + /* 0xE6 @ 354 */ 0xC3, 0xA6, + /* 0xE7 @ 356 */ 0xC3, 0xA7, + /* 0xE8 @ 358 */ 0xC3, 0xA8, + /* 0xE9 @ 360 */ 0xC3, 0xA9, + /* 0xEA @ 362 */ 0xC3, 0xAA, + /* 0xEB @ 364 */ 0xC3, 0xAB, + /* 0xEC @ 366 */ 0xC3, 0xAC, + /* 0xED @ 368 */ 0xC3, 0xAD, + /* 0xEE @ 370 */ 0xC3, 0xAE, + /* 0xEF @ 372 */ 0xC3, 0xAF, + /* 0xF0 @ 374 */ 0xC3, 0xB0, + /* 0xF1 @ 376 */ 0xC3, 0xB1, + /* 0xF2 @ 378 */ 0xC3, 0xB2, + /* 0xF3 @ 380 */ 0xC3, 0xB3, + /* 0xF4 @ 382 */ 0xC3, 0xB4, + /* 0xF5 @ 384 */ 0xC3, 0xB5, + /* 0xF6 @ 386 */ 0xC3, 0xB6, + /* 0xF7 @ 388 */ 0xC3, 0xB7, + /* 0xF8 @ 390 */ 0xC3, 0xB8, + /* 0xF9 @ 392 */ 0xC3, 0xB9, + /* 0xFA @ 394 */ 0xC3, 0xBA, + /* 0xFB @ 396 */ 0xC3, 0xBB, + /* 0xFC @ 398 */ 0xC3, 0xBC, + /* 0xFD @ 400 */ 0xC3, 0xBD, + /* 0xFE @ 402 */ 0xC3, 0xBE, + /* 0xFF @ 404 */ 0xC3, 0xBF, +}; + +static const uint16_t tblofs[257] = { + /* 0x00 */ 0, 1, 2, 3, 4, 5, 6, 7, + /* 0x08 */ 8, 9, 10, 11, 12, 13, 14, 15, + /* 0x10 */ 16, 17, 18, 19, 20, 21, 22, 23, + /* 0x18 */ 24, 25, 26, 27, 28, 29, 30, 31, + /* 0x20 */ 32, 33, 34, 35, 36, 37, 38, 39, + /* 0x28 */ 40, 41, 42, 43, 44, 45, 46, 47, + /* 0x30 */ 48, 49, 50, 51, 52, 53, 54, 55, + /* 0x38 */ 56, 57, 58, 59, 60, 61, 62, 63, + /* 0x40 */ 64, 65, 66, 67, 68, 69, 70, 71, + /* 0x48 */ 72, 73, 74, 75, 76, 77, 78, 79, + /* 0x50 */ 80, 81, 82, 83, 84, 85, 86, 87, + /* 0x58 */ 88, 89, 90, 91, 92, 93, 94, 95, + /* 0x60 */ 96, 97, 98, 99, 100, 101, 102, 103, + /* 0x68 */ 104, 105, 106, 107, 108, 109, 110, 111, + /* 0x70 */ 112, 113, 114, 115, 116, 117, 118, 119, + /* 0x78 */ 120, 121, 122, 123, 124, 125, 126, 127, + /* 0x80 */ 128, 131, 134, 137, 139, 142, 145, 148, + /* 0x88 */ 151, 153, 156, 158, 161, 163, 166, 168, + /* 0x90 */ 171, 174, 177, 180, 183, 186, 189, 192, + /* 0x98 */ 195, 197, 200, 202, 205, 207, 210, 212, + /* 0xA0 */ 214, 216, 218, 220, 222, 224, 226, 228, + /* 0xA8 */ 230, 232, 234, 236, 238, 240, 242, 244, + /* 0xB0 */ 246, 248, 250, 252, 254, 256, 258, 260, + /* 0xB8 */ 262, 264, 266, 268, 270, 272, 274, 276, + /* 0xC0 */ 278, 280, 282, 284, 286, 288, 290, 292, + /* 0xC8 */ 294, 296, 298, 300, 302, 304, 306, 308, + /* 0xD0 */ 310, 312, 314, 316, 318, 320, 322, 324, + /* 0xD8 */ 326, 328, 330, 332, 334, 336, 338, 340, + /* 0xE0 */ 342, 344, 346, 348, 350, 352, 354, 356, + /* 0xE8 */ 358, 360, 362, 364, 366, 368, 370, 372, + /* 0xF0 */ 374, 376, 378, 380, 382, 384, 386, 388, + /* 0xF8 */ 390, 392, 394, 396, 398, 400, 402, 404, + /* sizeof (cp1252_utf8) */ 406 +}; + +/* Check if a string qualifies as UTF-8. */ +static int +is_utf8(const char* src) +{ + uint8_t ch; + size_t i; + const uint8_t* s = (const uint8_t*) src; + + /* We make a loop over every character, until we find a null one. + Remember: The string is supposed to end with a NUL, so ahead checks are safe. */ + while ((ch = *s++)) { + /* Ye olde 7bit ASCII chars 'rr fine for anything */ + if(ch < 0x80) continue; + + /* Now, we watch out for non-UTF conform sequences. */ + else if ((ch < 0xC2) || (ch > 0xFD)) + return 0; + /* check for some misformed sequences */ + if (((ch == 0xC2) && (s[0] < 0xA0)) || + ((ch == 0xEF) && (s[0] == 0xBF) && (s[1] > 0xBD))) + /* XXX add more for outside the BMP */ + return 0; + + /* Check the continuation bytes. */ + if (ch < 0xE0) i = 1; + else if (ch < 0xF0) i = 2; + else if (ch < 0xF8) i = 3; + else if (ch < 0xFC) i = 4; + else + i = 5; + + while (i--) + if ((*s++ & 0xC0) != 0x80) + return 0; + } + + /* If no check failed, the string indeed looks like valid UTF-8. */ + return 1; +} + +/* The main conversion routine. + ICY in CP-1252 (or UTF-8 alreay) to UTF-8 encoded string. + If force is applied, it will always encode to UTF-8, without checking. */ +char * +icy2utf8(const char *src, int force) +{ + const uint8_t *s = (const uint8_t *)src; + size_t srclen, dstlen, i, k; + uint8_t ch, *d; + char *dst; + + /* Some funny streams from Apple/iTunes give ICY info in UTF-8 already. + So, be prepared and don't try to re-encode such. Unless forced. */ + if(!force && is_utf8(src)) return (strdup(src)); + + srclen = strlen(src) + 1; + /* allocate conservatively */ + if ((d = malloc(srclen * 3)) == NULL) + return (NULL); + + i = 0; + dstlen = 0; + while (i < srclen) { + ch = s[i++]; + k = tblofs[ch]; + while (k < tblofs[ch + 1]) + d[dstlen++] = cp1252_utf8[k++]; + } + + /* dstlen includes trailing NUL since srclen also does */ + if ((dst = realloc(d, dstlen)) == NULL) { + free(d); + return (NULL); + } + return (dst); +} + +/* This stuff is for testing only. */ +#ifdef TEST +static const char intext[] = "\225 Gr\374\337e kosten 0,55 \200\205"; + +#include + +int +main(void) +{ + char *t, *t2; + + if ((t = icy2utf8(intext, 0)) == NULL) { + fprintf(stderr, "out of memory\n"); + return (1); + } + + /* make sure it won't be converted twice */ + if ((t2 = icy2utf8(t), 0) == NULL) { + fprintf(stderr, "out of memory\n"); + return (1); + } + + printf("Result is:\t\343\200\214%s\343\200\215\n" + "\t\t\343\200\214%s\343\200\215\n", t, t2); + + free(t); + free(t2); + return (0); +} +#endif diff --git a/deps/mpg123/src/libmpg123/icy2utf8.h b/deps/mpg123/src/libmpg123/icy2utf8.h new file mode 100644 index 0000000..aeec012 --- /dev/null +++ b/deps/mpg123/src/libmpg123/icy2utf8.h @@ -0,0 +1,10 @@ +/* You expect a license plate for _this_ file? */ +#ifndef MPG123_ICY2UTF_H +#define MPG123_ICY2UTF_H + +#ifndef NO_ICY +/* (string, force conversion) */ +char *icy2utf8(const char *, int); +#endif + +#endif diff --git a/deps/mpg123/src/libmpg123/id3.c b/deps/mpg123/src/libmpg123/id3.c new file mode 100644 index 0000000..a2183aa --- /dev/null +++ b/deps/mpg123/src/libmpg123/id3.c @@ -0,0 +1,999 @@ +/* + id3: ID3v2.3 and ID3v2.4 parsing (a relevant subset) + + copyright 2006-2008 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Thomas Orgis +*/ + +#include "mpg123lib_intern.h" +#include "id3.h" +#include "debug.h" + +#ifndef NO_ID3V2 /* Only the main parsing routine will always be there. */ + +/* We know the usual text frames plus some specifics. */ +#define KNOWN_FRAMES 4 +static const char frame_type[KNOWN_FRAMES][5] = { "COMM", "TXXX", "RVA2", "USLT" }; +enum frame_types { unknown = -2, text = -1, comment, extra, rva2, uslt }; + +/* UTF support definitions */ + +typedef void (*text_converter)(mpg123_string *sb, const unsigned char* source, size_t len, const int noquiet); + +static void convert_latin1 (mpg123_string *sb, const unsigned char* source, size_t len, const int noquiet); +static void convert_utf16bom(mpg123_string *sb, const unsigned char* source, size_t len, const int noquiet); +static void convert_utf8 (mpg123_string *sb, const unsigned char* source, size_t len, const int noquiet); + +static const text_converter text_converters[4] = +{ + convert_latin1, + /* We always check for (multiple) BOM in 16bit unicode. Without BOM, UTF16 BE is the default. + Errors in encoding are detected anyway. */ + convert_utf16bom, + convert_utf16bom, + convert_utf8 +}; + +static const unsigned int encoding_widths[4] = { 1, 2, 2, 1 }; + +/* the code starts here... */ + +static void null_id3_links(mpg123_handle *fr) +{ + fr->id3v2.title = NULL; + fr->id3v2.artist = NULL; + fr->id3v2.album = NULL; + fr->id3v2.year = NULL; + fr->id3v2.genre = NULL; + fr->id3v2.comment = NULL; +} + +void init_id3(mpg123_handle *fr) +{ + fr->id3v2.version = 0; /* nothing there */ + null_id3_links(fr); + fr->id3v2.comments = 0; + fr->id3v2.comment_list = NULL; + fr->id3v2.texts = 0; + fr->id3v2.text = NULL; + fr->id3v2.extras = 0; + fr->id3v2.extra = NULL; +} + +/* Managing of the text, comment and extra lists. */ + +/* Initialize one element. */ +static void init_mpg123_text(mpg123_text *txt) +{ + mpg123_init_string(&txt->text); + mpg123_init_string(&txt->description); + txt->id[0] = 0; + txt->id[1] = 0; + txt->id[2] = 0; + txt->id[3] = 0; + txt->lang[0] = 0; + txt->lang[1] = 0; + txt->lang[2] = 0; +} + +/* Free memory of one element. */ +static void free_mpg123_text(mpg123_text *txt) +{ + mpg123_free_string(&txt->text); + mpg123_free_string(&txt->description); +} + +/* Free memory of whole list. */ +#define free_comment(mh) free_id3_text(&((mh)->id3v2.comment_list), &((mh)->id3v2.comments)) +#define free_text(mh) free_id3_text(&((mh)->id3v2.text), &((mh)->id3v2.texts)) +#define free_extra(mh) free_id3_text(&((mh)->id3v2.extra), &((mh)->id3v2.extras)) +static void free_id3_text(mpg123_text **list, size_t *size) +{ + size_t i; + for(i=0; i<*size; ++i) free_mpg123_text(&((*list)[i])); + + free(*list); + *list = NULL; + *size = 0; +} + +/* Add items to the list. */ +#define add_comment(mh) add_id3_text(&((mh)->id3v2.comment_list), &((mh)->id3v2.comments)) +#define add_text(mh) add_id3_text(&((mh)->id3v2.text), &((mh)->id3v2.texts)) +#define add_extra(mh) add_id3_text(&((mh)->id3v2.extra), &((mh)->id3v2.extras)) +static mpg123_text *add_id3_text(mpg123_text **list, size_t *size) +{ + mpg123_text *x = safe_realloc(*list, sizeof(mpg123_text)*(*size+1)); + if(x == NULL) return NULL; /* bad */ + + *list = x; + *size += 1; + init_mpg123_text(&((*list)[*size-1])); + + return &((*list)[*size-1]); /* Return pointer to the added text. */ +} + +/* Remove the last item. */ +#define pop_comment(mh) pop_id3_text(&((mh)->id3v2.comment_list), &((mh)->id3v2.comments)) +#define pop_text(mh) pop_id3_text(&((mh)->id3v2.text), &((mh)->id3v2.texts)) +#define pop_extra(mh) pop_id3_text(&((mh)->id3v2.extra), &((mh)->id3v2.extras)) +static void pop_id3_text(mpg123_text **list, size_t *size) +{ + mpg123_text *x; + if(*size < 1) return; + + free_mpg123_text(&((*list)[*size-1])); + if(*size > 1) + { + x = safe_realloc(*list, sizeof(mpg123_text)*(*size-1)); + if(x != NULL){ *list = x; *size -= 1; } + } + else + { + free(*list); + *list = NULL; + *size = 0; + } +} + +/* OK, back t the higher level functions. */ + +void exit_id3(mpg123_handle *fr) +{ + free_comment(fr); + free_extra(fr); + free_text(fr); +} + +void reset_id3(mpg123_handle *fr) +{ + exit_id3(fr); + init_id3(fr); +} + +/* Set the id3v2.artist id3v2.title ... links to elements of the array. */ +void id3_link(mpg123_handle *fr) +{ + size_t i; + mpg123_id3v2 *v2 = &fr->id3v2; + debug("linking ID3v2"); + null_id3_links(fr); + for(i=0; itexts; ++i) + { + mpg123_text *entry = &v2->text[i]; + if (!strncmp("TIT2", entry->id, 4)) v2->title = &entry->text; + else if(!strncmp("TALB", entry->id, 4)) v2->album = &entry->text; + else if(!strncmp("TPE1", entry->id, 4)) v2->artist = &entry->text; + else if(!strncmp("TYER", entry->id, 4)) v2->year = &entry->text; + else if(!strncmp("TCON", entry->id, 4)) v2->genre = &entry->text; + } + for(i=0; icomments; ++i) + { + mpg123_text *entry = &v2->comment_list[i]; + if(entry->description.fill == 0 || entry->description.p[0] == 0) + v2->comment = &entry->text; + } + /* When no generic comment found, use the last non-generic one. */ + if(v2->comment == NULL && v2->comments > 0) + v2->comment = &v2->comment_list[v2->comments-1].text; +} + +/* + Store ID3 text data in an mpg123_string; either verbatim copy or everything translated to UTF-8 encoding. + Preserve the zero string separator (I don't need strlen for the total size). + + ID3v2 standard says that there should be one text frame of specific type per tag, and subsequent tags overwrite old values. + So, I always replace the text that may be stored already (perhaps with a list of zero-separated strings, though). +*/ +static void store_id3_text(mpg123_string *sb, char *source, size_t source_size, const int noquiet, const int notranslate) +{ + if(!source_size) + { + debug("Empty id3 data!"); + return; + } + + /* We shall just copy the data. Client wants to decode itself. */ + if(notranslate) + { + /* Future: Add a path for ID3 errors. */ + if(!mpg123_resize_string(sb, source_size)) + { + if(noquiet) error("Cannot resize target string, out of memory?"); + return; + } + memcpy(sb->p, source, source_size); + sb->fill = source_size; + debug1("stored undecoded ID3 text of size %"SIZE_P, (size_p)source_size); + return; + } + + id3_to_utf8(sb, ((unsigned char *)source)[0], (unsigned char*)source+1, source_size-1, noquiet); + + if(sb->fill) debug1("UTF-8 string (the first one): %s", sb->p); + else if(noquiet) error("unable to convert string to UTF-8 (out of memory, junk input?)!"); +} + +/* On error, sb->size is 0. */ +void id3_to_utf8(mpg123_string *sb, unsigned char encoding, const unsigned char *source, size_t source_size, int noquiet) +{ + unsigned int bwidth; + debug1("encoding: %u", encoding); + /* A note: ID3v2.3 uses UCS-2 non-variable 16bit encoding, v2.4 uses UTF16. + UTF-16 uses a reserved/private range in UCS-2 to add the magic, so we just always treat it as UTF. */ + if(encoding > mpg123_id3_enc_max) + { + if(noquiet) error1("Unknown text encoding %u, I take no chances, sorry!", encoding); + + mpg123_free_string(sb); + return; + } + bwidth = encoding_widths[encoding]; + /* Hack! I've seen a stray zero byte before BOM. Is that supposed to happen? */ + if(encoding != mpg123_id3_utf16be) /* UTF16be _can_ beging with a null byte! */ + while(source_size > bwidth && source[0] == 0) + { + --source_size; + ++source; + debug("skipped leading zero"); + } + if(source_size % bwidth) + { + /* When we need two bytes for a character, it's strange to have an uneven bytestream length. */ + if(noquiet) warning2("Weird tag size %d for encoding %u - I will probably trim too early or something but I think the MP3 is broken.", (int)source_size, encoding); + source_size -= source_size % bwidth; + } + text_converters[encoding](sb, source, source_size, noquiet); +} + +static char *next_text(char* prev, int encoding, size_t limit) +{ + char *text = prev; + size_t width = encoding_widths[encoding]; + + /* So I go lengths to find zero or double zero... + Remember bug 2834636: Only check for aligned NULLs! */ + while(text-prev < (ssize_t)limit) + { + if(text[0] == 0) + { + if(width <= limit-(text-prev)) + { + size_t i = 1; + for(; i= limit) text = NULL; + + return text; +} + +static const char *enc_name(int enc) +{ + switch(enc) + { + case 0: return "Latin 1"; + case 1: return "UTF-16 BOM"; + case 2: return "UTF-16 BE"; + case 3: return "UTF-8"; + default: return "unknown!"; + } +} + +static void process_text(mpg123_handle *fr, char *realdata, size_t realsize, char *id) +{ + /* Text encoding $xx */ + /* The text (encoded) ... */ + mpg123_text *t = add_text(fr); + if(VERBOSE4) fprintf(stderr, "Note: Storing text from %s encoding\n", enc_name(realdata[0])); + if(t == NULL) + { + if(NOQUIET) error("Unable to attach new text!"); + return; + } + memcpy(t->id, id, 4); + store_id3_text(&t->text, realdata, realsize, NOQUIET, fr->p.flags & MPG123_PLAIN_ID3TEXT); + if(VERBOSE4) fprintf(stderr, "Note: ID3v2 %c%c%c%c text frame: %s\n", id[0], id[1], id[2], id[3], t->text.p); +} + +/* Store a new comment that perhaps is a RVA / RVA_ALBUM/AUDIOPHILE / RVA_MIX/RADIO one + Special gimmik: It also stores USLT to the texts. Stucture is the same as for comments. */ +static void process_comment(mpg123_handle *fr, enum frame_types tt, char *realdata, size_t realsize, int rva_level, char *id) +{ + /* Text encoding $xx */ + /* Language $xx xx xx */ + /* Short description (encoded!) $00 (00) */ + /* Then the comment text (encoded) ... */ + char encoding = realdata[0]; + char *lang = realdata+1; /* I'll only use the 3 bytes! */ + char *descr = realdata+4; + char *text = NULL; + mpg123_text *xcom = NULL; + mpg123_text localcom; /* UTF-8 variant for local processing. */ + + if((int)realsize < descr-realdata) + { + if(NOQUIET) error1("Invalid frame size of %lu (too small for anything).", (unsigned long)realsize); + return; + } + xcom = (tt == uslt ? add_text(fr) : add_comment(fr)); + if(VERBOSE4) fprintf(stderr, "Note: Storing comment from %s encoding\n", enc_name(realdata[0])); + if(xcom == NULL) + { + if(NOQUIET) error("Unable to attach new comment!"); + return; + } + memcpy(xcom->lang, lang, 3); + memcpy(xcom->id, id, 4); + /* Now I can abuse a byte from lang for the encoding. */ + descr[-1] = encoding; + /* Be careful with finding the end of description, I have to honor encoding here. */ + text = next_text(descr, encoding, realsize-(descr-realdata)); + if(text == NULL) + { + if(NOQUIET) error("No comment text / valid description?"); + pop_comment(fr); + return; + } + + init_mpg123_text(&localcom); + /* Store the text, without translation to UTF-8, but for comments always a local copy in UTF-8. + Reminder: No bailing out from here on without freeing the local comment data! */ + store_id3_text(&xcom->description, descr-1, text-descr+1, NOQUIET, fr->p.flags & MPG123_PLAIN_ID3TEXT); + if(tt == comment) + store_id3_text(&localcom.description, descr-1, text-descr+1, NOQUIET, 0); + + text[-1] = encoding; /* Byte abusal for encoding... */ + store_id3_text(&xcom->text, text-1, realsize+1-(text-realdata), NOQUIET, fr->p.flags & MPG123_PLAIN_ID3TEXT); + /* Remember: I will probably decode the above (again) for rva comment checking. So no messing around, please. */ + + if(VERBOSE4) /* Do _not_ print the verbatim text: The encoding might be funny! */ + { + fprintf(stderr, "Note: ID3 comm/uslt desc of length %"SIZE_P".\n", (size_p)xcom->description.fill); + fprintf(stderr, "Note: ID3 comm/uslt text of length %"SIZE_P".\n", (size_p)xcom->text.fill); + } + /* Look out for RVA info only when we really deal with a straight comment. */ + if(tt == comment && localcom.description.fill > 0) + { + int rva_mode = -1; /* mix / album */ + if( !strcasecmp(localcom.description.p, "rva") + || !strcasecmp(localcom.description.p, "rva_mix") + || !strcasecmp(localcom.description.p, "rva_track") + || !strcasecmp(localcom.description.p, "rva_radio") ) + rva_mode = 0; + else if( !strcasecmp(localcom.description.p, "rva_album") + || !strcasecmp(localcom.description.p, "rva_audiophile") + || !strcasecmp(localcom.description.p, "rva_user") ) + rva_mode = 1; + if((rva_mode > -1) && (fr->rva.level[rva_mode] <= rva_level)) + { + /* Only translate the contents in here where we really need them. */ + store_id3_text(&localcom.text, text-1, realsize+1-(text-realdata), NOQUIET, 0); + if(localcom.text.fill > 0) + { + fr->rva.gain[rva_mode] = (float) atof(localcom.text.p); + if(VERBOSE3) fprintf(stderr, "Note: RVA value %fdB\n", fr->rva.gain[rva_mode]); + fr->rva.peak[rva_mode] = 0; + fr->rva.level[rva_mode] = rva_level; + } + } + } + /* Make sure to free the local memory... */ + free_mpg123_text(&localcom); +} + +static void process_extra(mpg123_handle *fr, char* realdata, size_t realsize, int rva_level, char *id) +{ + /* Text encoding $xx */ + /* Description ... $00 (00) */ + /* Text ... */ + char encoding = realdata[0]; + char *descr = realdata+1; /* remember, the encoding is descr[-1] */ + char *text; + mpg123_text *xex; + mpg123_text localex; + + if((int)realsize < descr-realdata) + { + if(NOQUIET) error1("Invalid frame size of %lu (too small for anything).", (unsigned long)realsize); + return; + } + text = next_text(descr, encoding, realsize-(descr-realdata)); + if(VERBOSE4) fprintf(stderr, "Note: Storing extra from %s encoding\n", enc_name(realdata[0])); + if(text == NULL) + { + if(NOQUIET) error("No extra frame text / valid description?"); + return; + } + xex = add_extra(fr); + if(xex == NULL) + { + if(NOQUIET) error("Unable to attach new extra text!"); + return; + } + memcpy(xex->id, id, 4); + init_mpg123_text(&localex); /* For our local copy. */ + + /* The outside storage gets reencoded to UTF-8 only if not requested otherwise. + Remember that we really need the -1 here to hand in the encoding byte!*/ + store_id3_text(&xex->description, descr-1, text-descr+1, NOQUIET, fr->p.flags & MPG123_PLAIN_ID3TEXT); + /* Our local copy is always stored in UTF-8! */ + store_id3_text(&localex.description, descr-1, text-descr+1, NOQUIET, 0); + /* At first, only store the outside copy of the payload. We may not need the local copy. */ + text[-1] = encoding; + store_id3_text(&xex->text, text-1, realsize-(text-realdata)+1, NOQUIET, fr->p.flags & MPG123_PLAIN_ID3TEXT); + + /* Now check if we would like to interpret this extra info for RVA. */ + if(localex.description.fill > 0) + { + int is_peak = 0; + int rva_mode = -1; /* mix / album */ + + if(!strncasecmp(localex.description.p, "replaygain_track_",17)) + { + if(VERBOSE3) fprintf(stderr, "Note: RVA ReplayGain track gain/peak\n"); + + rva_mode = 0; + if(!strcasecmp(localex.description.p, "replaygain_track_peak")) is_peak = 1; + else if(strcasecmp(localex.description.p, "replaygain_track_gain")) rva_mode = -1; + } + else + if(!strncasecmp(localex.description.p, "replaygain_album_",17)) + { + if(VERBOSE3) fprintf(stderr, "Note: RVA ReplayGain album gain/peak\n"); + + rva_mode = 1; + if(!strcasecmp(localex.description.p, "replaygain_album_peak")) is_peak = 1; + else if(strcasecmp(localex.description.p, "replaygain_album_gain")) rva_mode = -1; + } + if((rva_mode > -1) && (fr->rva.level[rva_mode] <= rva_level)) + { + /* Now we need the translated copy of the data. */ + store_id3_text(&localex.text, text-1, realsize-(text-realdata)+1, NOQUIET, 0); + if(localex.text.fill > 0) + { + if(is_peak) + { + fr->rva.peak[rva_mode] = (float) atof(localex.text.p); + if(VERBOSE3) fprintf(stderr, "Note: RVA peak %f\n", fr->rva.peak[rva_mode]); + } + else + { + fr->rva.gain[rva_mode] = (float) atof(localex.text.p); + if(VERBOSE3) fprintf(stderr, "Note: RVA gain %fdB\n", fr->rva.gain[rva_mode]); + } + fr->rva.level[rva_mode] = rva_level; + } + } + } + + free_mpg123_text(&localex); +} + +/* Make a ID3v2.3+ 4-byte ID from a ID3v2.2 3-byte ID + Note that not all frames survived to 2.4; the mapping goes to 2.3 . + A notable miss is the old RVA frame, which is very unspecific anyway. + This function returns -1 when a not known 3 char ID was encountered, 0 otherwise. */ +static int promote_framename(mpg123_handle *fr, char *id) /* fr because of VERBOSE macros */ +{ + size_t i; + char *old[] = + { + "COM", "TAL", "TBP", "TCM", "TCO", "TCR", "TDA", "TDY", "TEN", "TFT", + "TIM", "TKE", "TLA", "TLE", "TMT", "TOA", "TOF", "TOL", "TOR", "TOT", + "TP1", "TP2", "TP3", "TP4", "TPA", "TPB", "TRC", "TDA", "TRK", "TSI", + "TSS", "TT1", "TT2", "TT3", "TXT", "TXX", "TYE" + }; + char *new[] = + { + "COMM", "TALB", "TBPM", "TCOM", "TCON", "TCOP", "TDAT", "TDLY", "TENC", "TFLT", + "TIME", "TKEY", "TLAN", "TLEN", "TMED", "TOPE", "TOFN", "TOLY", "TORY", "TOAL", + "TPE1", "TPE2", "TPE3", "TPE4", "TPOS", "TPUB", "TSRC", "TRDA", "TRCK", "TSIZ", + "TSSE", "TIT1", "TIT2", "TIT3", "TEXT", "TXXX", "TYER" + }; + for(i=0; ird->read_frame_body(fr, buf, 6)) < 0) /* read more header information */ + return ret2; + + if(buf[0] == 0xff) return 0; /* Revision, will never be 0xff. */ + + /* second new byte are some nice flags, if these are invalid skip the whole thing */ + flags = buf[1]; + debug1("ID3v2: flags 0x%08x", flags); + /* use 4 bytes from buf to construct 28bit uint value and return 1; return 0 if bytes are not synchsafe */ + #define synchsafe_to_long(buf,res) \ + ( \ + (((buf)[0]|(buf)[1]|(buf)[2]|(buf)[3]) & 0x80) ? 0 : \ + (res = (((unsigned long) (buf)[0]) << 21) \ + | (((unsigned long) (buf)[1]) << 14) \ + | (((unsigned long) (buf)[2]) << 7) \ + | ((unsigned long) (buf)[3]) \ + ,1) \ + ) + /* id3v2.3 does not store synchsafe frame sizes, but synchsafe tag size - doh! */ + #define bytes_to_long(buf,res) \ + ( \ + major == 3 ? \ + (res = (((unsigned long) (buf)[0]) << 24) \ + | (((unsigned long) (buf)[1]) << 16) \ + | (((unsigned long) (buf)[2]) << 8) \ + | ((unsigned long) (buf)[3]) \ + ,1) : synchsafe_to_long(buf,res) \ + ) + /* for id3v2.2 only */ + #define threebytes_to_long(buf,res) \ + ( \ + res = (((unsigned long) (buf)[0]) << 16) \ + | (((unsigned long) (buf)[1]) << 8) \ + | ((unsigned long) (buf)[2]) \ + ,1 \ + ) + + /* length-10 or length-20 (footer present); 4 synchsafe integers == 28 bit number */ + /* we have already read 10 bytes, so left are length or length+10 bytes belonging to tag */ + if(!synchsafe_to_long(buf+2,length)) + { + if(NOQUIET) error4("Bad tag length (not synchsafe): 0x%02x%02x%02x%02x; You got a bad ID3 tag here.", buf[2],buf[3],buf[4],buf[5]); + return 0; + } + debug1("ID3v2: tag data length %lu", length); +#ifndef NO_ID3V2 + if(VERBOSE2) fprintf(stderr,"Note: ID3v2.%i rev %i tag of %lu bytes\n", major, buf[0], length); + /* skip if unknown version/scary flags, parse otherwise */ + if(fr->p.flags & MPG123_SKIP_ID3V2 || ((flags & UNKNOWN_FLAGS) || (major > 4) || (major < 2))) + { + if(NOQUIET) + { + if(fr->p.flags & MPG123_SKIP_ID3V2) + { + if(VERBOSE3) fprintf(stderr, "Note: Skipping ID3v2 tag per user request.\n"); + } + else /* Must be because of scary Tag properties. */ + warning2("ID3v2: Won't parse the ID3v2 tag with major version %u and flags 0x%xu - some extra code may be needed", major, flags); + } +#endif + if((ret2 = fr->rd->skip_bytes(fr,length)) < 0) /* will not store data in backbuff! */ + ret = ret2; +#ifndef NO_ID3V2 + } + else + { + unsigned char* tagdata = NULL; + fr->id3v2.version = major; + /* try to interpret that beast */ + if((tagdata = (unsigned char*) malloc(length+1)) != NULL) + { + debug("ID3v2: analysing frames..."); + if((ret2 = fr->rd->read_frame_body(fr,tagdata,length)) > 0) + { + unsigned long tagpos = 0; + debug1("ID3v2: have read at all %lu bytes for the tag now", (unsigned long)length+6); + /* going to apply strlen for strings inside frames, make sure that it doesn't overflow! */ + tagdata[length] = 0; + if(flags & EXTHEAD_FLAG) + { + debug("ID3v2: skipping extended header"); + if(!bytes_to_long(tagdata, tagpos)) + { + ret = 0; + if(NOQUIET) error4("Bad (non-synchsafe) tag offset: 0x%02x%02x%02x%02x", tagdata[0], tagdata[1], tagdata[2], tagdata[3]); + } + } + if(ret > 0) + { + char id[5]; + unsigned long framesize; + unsigned long fflags; /* need 16 bits, actually */ + id[4] = 0; + /* pos now advanced after ext head, now a frame has to follow */ + while(tagpos < length-10) /* I want to read at least a full header */ + { + int i = 0; + unsigned long pos = tagpos; + int head_part = fr->id3v2.version == 2 ? 3 : 4; /* bytes of frame title and of framesize value */ + /* level 1,2,3 - 0 is info from lame/info tag! */ + /* rva tags with ascending significance, then general frames */ + enum frame_types tt = unknown; + /* we may have entered the padding zone or any other strangeness: check if we have valid frame id characters */ + for(i=0; i< head_part; ++i) + if( !( ((tagdata[tagpos+i] > 47) && (tagdata[tagpos+i] < 58)) + || ((tagdata[tagpos+i] > 64) && (tagdata[tagpos+i] < 91)) ) ) + { + debug5("ID3v2: real tag data apparently ended after %lu bytes with 0x%02x%02x%02x%02x", tagpos, tagdata[tagpos], tagdata[tagpos+1], tagdata[tagpos+2], tagdata[tagpos+3]); + /* This is no hard error... let's just hope that we got something meaningful already (ret==1 in that case). */ + goto tagparse_cleanup; /* Need to escape two loops here. */ + } + if(ret > 0) + { + /* 4 or 3 bytes id */ + strncpy(id, (char*) tagdata+pos, head_part); + id[head_part] = 0; /* terminate for 3 or 4 bytes */ + pos += head_part; + tagpos += head_part; + /* size as 32 bits or 28 bits */ + if(fr->id3v2.version == 2) threebytes_to_long(tagdata+pos, framesize); + else + if(!bytes_to_long(tagdata+pos, framesize)) + { + /* Just assume that up to now there was some good data. */ + if(NOQUIET) error1("ID3v2: non-syncsafe size of %s frame, skipping the remainder of tag", id); + break; + } + if(VERBOSE3) fprintf(stderr, "Note: ID3v2 %s frame of size %lu\n", id, framesize); + tagpos += head_part + framesize; /* the important advancement in whole tag */ + if(tagpos > length) + { + if(NOQUIET) error("Whoa! ID3v2 frame claims to be larger than the whole rest of the tag."); + break; + } + pos += head_part; + if(fr->id3v2.version > 2) + { + fflags = (((unsigned long) tagdata[pos]) << 8) | ((unsigned long) tagdata[pos+1]); + pos += 2; + tagpos += 2; + } + else fflags = 0; + /* for sanity, after full parsing tagpos should be == pos */ + /* debug4("ID3v2: found %s frame, size %lu (as bytes: 0x%08lx), flags 0x%016lx", id, framesize, framesize, fflags); */ + /* %0abc0000 %0h00kmnp */ + #define BAD_FFLAGS (unsigned long) 36784 + #define PRES_TAG_FFLAG 16384 + #define PRES_FILE_FFLAG 8192 + #define READ_ONLY_FFLAG 4096 + #define GROUP_FFLAG 64 + #define COMPR_FFLAG 8 + #define ENCR_FFLAG 4 + #define UNSYNC_FFLAG 2 + #define DATLEN_FFLAG 1 + if(head_part < 4 && promote_framename(fr, id) != 0) continue; + + /* shall not or want not handle these */ + if(fflags & (BAD_FFLAGS | COMPR_FFLAG | ENCR_FFLAG)) + { + if(NOQUIET) warning("ID3v2: skipping invalid/unsupported frame"); + continue; + } + + for(i = 0; i < KNOWN_FRAMES; ++i) + if(!strncmp(frame_type[i], id, 4)){ tt = i; break; } + + if(id[0] == 'T' && tt != extra) tt = text; + + if(tt != unknown) + { + int rva_mode = -1; /* mix / album */ + unsigned long realsize = framesize; + unsigned char* realdata = tagdata+pos; + if((flags & UNSYNC_FLAG) || (fflags & UNSYNC_FFLAG)) + { + unsigned long ipos = 0; + unsigned long opos = 0; + debug("Id3v2: going to de-unsync the frame data"); + /* de-unsync: FF00 -> FF; real FF00 is simply represented as FF0000 ... */ + /* damn, that means I have to delete bytes from withing the data block... thus need temporal storage */ + /* standard mandates that de-unsync should always be safe if flag is set */ + realdata = (unsigned char*) malloc(framesize); /* will need <= bytes */ + if(realdata == NULL) + { + if(NOQUIET) error("ID3v2: unable to allocate working buffer for de-unsync"); + continue; + } + /* now going byte per byte through the data... */ + realdata[0] = tagdata[pos]; + opos = 1; + for(ipos = pos+1; ipos < pos+framesize; ++ipos) + { + if(!((tagdata[ipos] == 0) && (tagdata[ipos-1] == 0xff))) + { + realdata[opos++] = tagdata[ipos]; + } + } + realsize = opos; + debug2("ID3v2: de-unsync made %lu out of %lu bytes", realsize, framesize); + } + pos = 0; /* now at the beginning again... */ + switch(tt) + { + case comment: + case uslt: + process_comment(fr, tt, (char*)realdata, realsize, comment+1, id); + break; + case extra: /* perhaps foobar2000's work */ + process_extra(fr, (char*)realdata, realsize, extra+1, id); + break; + case rva2: /* "the" RVA tag */ + { + /* starts with null-terminated identification */ + if(VERBOSE3) fprintf(stderr, "Note: RVA2 identification \"%s\"\n", realdata); + /* default: some individual value, mix mode */ + rva_mode = 0; + if( !strncasecmp((char*)realdata, "album", 5) + || !strncasecmp((char*)realdata, "audiophile", 10) + || !strncasecmp((char*)realdata, "user", 4)) + rva_mode = 1; + if(fr->rva.level[rva_mode] <= rva2+1) + { + pos += strlen((char*) realdata) + 1; + if(realdata[pos] == 1) + { + ++pos; + /* only handle master channel */ + debug("ID3v2: it is for the master channel"); + /* two bytes adjustment, one byte for bits representing peak - n bytes, eh bits, for peak */ + /* 16 bit signed integer = dB * 512 ... the double cast is needed to preserve the sign of negative values! */ + fr->rva.gain[rva_mode] = (float) ( (((short)((signed char)realdata[pos])) << 8) | realdata[pos+1] ) / 512; + pos += 2; + if(VERBOSE3) fprintf(stderr, "Note: RVA value %fdB\n", fr->rva.gain[rva_mode]); + /* heh, the peak value is represented by a number of bits - but in what manner? Skipping that part */ + fr->rva.peak[rva_mode] = 0; + fr->rva.level[rva_mode] = rva2+1; + } + } + } + break; + /* non-rva metainfo, simply store... */ + case text: + process_text(fr, (char*)realdata, realsize, id); + break; + default: if(NOQUIET) error1("ID3v2: unknown frame type %i", tt); + } + if((flags & UNSYNC_FLAG) || (fflags & UNSYNC_FFLAG)) free(realdata); + } + #undef BAD_FFLAGS + #undef PRES_TAG_FFLAG + #undef PRES_FILE_FFLAG + #undef READ_ONLY_FFLAG + #undef GROUP_FFLAG + #undef COMPR_FFLAG + #undef ENCR_FFLAG + #undef UNSYNC_FFLAG + #undef DATLEN_FFLAG + } + else break; + #undef KNOWN_FRAMES + } + } + } + else + { + /* There are tags with zero length. Strictly not an error, then. */ + if(length > 0 && NOQUIET && ret2 != MPG123_NEED_MORE) error("ID3v2: Duh, not able to read ID3v2 tag data."); + ret = ret2; + } +tagparse_cleanup: + free(tagdata); + } + else + { + if(NOQUIET) error1("ID3v2: Arrg! Unable to allocate %lu bytes for interpreting ID3v2 data - trying to skip instead.", length); + if((ret2 = fr->rd->skip_bytes(fr,length)) < 0) ret = ret2; /* will not store data in backbuff! */ + else ret = 0; + } + } +#endif /* NO_ID3V2 */ + /* skip footer if present */ + if((ret > 0) && (flags & FOOTER_FLAG) && ((ret2 = fr->rd->skip_bytes(fr,length)) < 0)) ret = ret2; + + return ret; + #undef UNSYNC_FLAG + #undef EXTHEAD_FLAG + #undef EXP_FLAG + #undef FOOTER_FLAG + #undef UNKOWN_FLAGS +} + +#ifndef NO_ID3V2 /* Disabling all the rest... */ + +static void convert_latin1(mpg123_string *sb, const unsigned char* s, size_t l, const int noquiet) +{ + size_t length = l; + size_t i; + unsigned char *p; + /* determine real length, a latin1 character can at most take 2 in UTF8 */ + for(i=0; i= 0x80) ++length; + + debug1("UTF-8 length: %lu", (unsigned long)length); + /* one extra zero byte for paranoia */ + if(!mpg123_resize_string(sb, length+1)){ mpg123_free_string(sb); return ; } + + p = (unsigned char*) sb->p; /* Signedness doesn't matter but it shows I thought about the non-issue */ + for(i=0; i>6); + *(p+1) = 0x80 | (s[i] & 0x3f); + p+=2; + } + + sb->p[length] = 0; + sb->fill = length+1; +} + +/* + Check if we have a byte oder mark(s) there, return: + -1: little endian + 0: no BOM + 1: big endian + + This modifies source and len to indicate the data _after_ the BOM(s). + Note on nasty data: The last encountered BOM determines the endianness. + I have seen data with multiple BOMS, namely from "the" id3v2 program. + Not nice, but what should I do? +*/ +static int check_bom(const unsigned char** source, size_t *len) +{ + int this_bom = 0; + int further_bom = 0; + + if(*len < 2) return 0; + + if((*source)[0] == 0xff && (*source)[1] == 0xfe) + this_bom = -1; + + if((*source)[0] == 0xfe && (*source)[1] == 0xff) + this_bom = 1; + + /* Skip the detected BOM. */ + if(this_bom != 0) + { + *source += 2; + *len -= 2; + /* Check for following BOMs. The last one wins! */ + further_bom = check_bom(source, len); + if(further_bom == 0) return this_bom; /* End of the recursion. */ + else return further_bom; + } + else return 0; +} + +#define FULLPOINT(f,s) ( (((f)&0x3ff)<<10) + ((s)&0x3ff) + 0x10000 ) +/* Remember: There's a limit at 0x1ffff. */ +#define UTF8LEN(x) ( (x)<0x80 ? 1 : ((x)<0x800 ? 2 : ((x)<0x10000 ? 3 : 4))) +static void convert_utf16bom(mpg123_string *sb, const unsigned char* s, size_t l, const int noquiet) +{ + size_t i; + size_t n; /* number bytes that make up full pairs */ + unsigned char *p; + size_t length = 0; /* the resulting UTF-8 length */ + /* Determine real length... extreme case can be more than utf-16 length. */ + size_t high = 0; + size_t low = 1; + int bom_endian; + + debug1("convert_utf16 with length %lu", (unsigned long)l); + + bom_endian = check_bom(&s, &l); + debug1("UTF16 endianness check: %i", bom_endian); + + if(bom_endian == -1) /* little-endian */ + { + high = 1; /* The second byte is the high byte. */ + low = 0; /* The first byte is the low byte. */ + } + + n = (l/2)*2; /* number bytes that make up full pairs */ + + /* first: get length, check for errors -- stop at first one */ + for(i=0; i < n; i+=2) + { + unsigned long point = ((unsigned long) s[i+high]<<8) + s[i+low]; + if((point & 0xd800) == 0xd800) /* lead surrogate */ + { + unsigned short second = (i+3 < l) ? (s[i+2+high]<<8) + s[i+2+low] : 0; + if((second & 0xdc00) == 0xdc00) /* good... */ + { + point = FULLPOINT(point,second); + length += UTF8LEN(point); /* possibly 4 bytes */ + i+=2; /* We overstepped one word. */ + } + else /* if no valid pair, break here */ + { + if(noquiet) error2("Invalid UTF16 surrogate pair at %li (0x%04lx).", (unsigned long)i, point); + n = i; /* Forget the half pair, END! */ + break; + } + } + else length += UTF8LEN(point); /* 1,2 or 3 bytes */ + } + + if(!mpg123_resize_string(sb, length+1)){ mpg123_free_string(sb); return ; } + + /* Now really convert, skip checks as these have been done just before. */ + p = (unsigned char*) sb->p; /* Signedness doesn't matter but it shows I thought about the non-issue */ + for(i=0; i < n; i+=2) + { + unsigned long codepoint = ((unsigned long) s[i+high]<<8) + s[i+low]; + if((codepoint & 0xd800) == 0xd800) /* lead surrogate */ + { + unsigned short second = (s[i+2+high]<<8) + s[i+2+low]; + codepoint = FULLPOINT(codepoint,second); + i+=2; /* We overstepped one word. */ + } + if(codepoint < 0x80) *p++ = (unsigned char) codepoint; + else if(codepoint < 0x800) + { + *p++ = (unsigned char) (0xc0 | (codepoint>>6)); + *p++ = (unsigned char) (0x80 | (codepoint & 0x3f)); + } + else if(codepoint < 0x10000) + { + *p++ = (unsigned char) (0xe0 | (codepoint>>12)); + *p++ = 0x80 | ((codepoint>>6) & 0x3f); + *p++ = 0x80 | (codepoint & 0x3f); + } + else if (codepoint < 0x200000) + { + *p++ = (unsigned char) (0xf0 | codepoint>>18); + *p++ = (unsigned char) (0x80 | ((codepoint>>12) & 0x3f)); + *p++ = (unsigned char) (0x80 | ((codepoint>>6) & 0x3f)); + *p++ = (unsigned char) (0x80 | (codepoint & 0x3f)); + } /* ignore bigger ones (that are not possible here anyway) */ + } + sb->p[sb->size-1] = 0; /* paranoia... */ + sb->fill = sb->size; +} +#undef UTF8LEN +#undef FULLPOINT + +static void convert_utf8(mpg123_string *sb, const unsigned char* source, size_t len, const int noquiet) +{ + if(mpg123_resize_string(sb, len+1)) + { + memcpy(sb->p, source, len); + sb->p[len] = 0; + sb->fill = len+1; + } + else mpg123_free_string(sb); +} + +#endif diff --git a/deps/mpg123/src/libmpg123/id3.h b/deps/mpg123/src/libmpg123/id3.h new file mode 100644 index 0000000..3a56694 --- /dev/null +++ b/deps/mpg123/src/libmpg123/id3.h @@ -0,0 +1,43 @@ +/* + id3: ID3v2.3 and ID3v2.4 parsing (a relevant subset) + + copyright 2006-2007 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Thomas Orgis +*/ + +#ifndef MPG123_ID3_H +#define MPG123_ID3_H + +/* really need it _here_! */ +#include "frame.h" + +#ifdef NO_ID3V2 +# ifdef init_id3 +# undef init_id3 +# endif +# define init_id3(fr) +# ifdef exit_id3 +# undef exit_id3 +# endif +# define exit_id3(fr) +# ifdef reset_id3 +# undef reset_id3 +# endif +# define reset_id3(fr) +# ifdef id3_link +# undef id3_link +# endif +# define id3_link(fr) +#else +void init_id3(mpg123_handle *fr); +void exit_id3(mpg123_handle *fr); +void reset_id3(mpg123_handle *fr); +void id3_link(mpg123_handle *fr); +#endif +int parse_new_id3(mpg123_handle *fr, unsigned long first4bytes); +/* Convert text from some ID3 encoding to UTf-8. + On error, sb->fill is 0. The noquiet flag enables warning/error messages. */ +void id3_to_utf8(mpg123_string *sb, unsigned char encoding, const unsigned char *source, size_t source_size, int noquiet); + +#endif diff --git a/deps/mpg123/src/libmpg123/index.c b/deps/mpg123/src/libmpg123/index.c new file mode 100644 index 0000000..bb5af32 --- /dev/null +++ b/deps/mpg123/src/libmpg123/index.c @@ -0,0 +1,134 @@ +/* + index: frame index data structure and functions + + copyright 2007-8 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Thomas Orgis +*/ + +#include "index.h" +#include "debug.h" + +/* The next expected frame offset, one step ahead. */ +static off_t fi_next(struct frame_index *fi) +{ + return (off_t)fi->fill*fi->step; +} + +/* Shrink down the used index to the half. + Be careful with size = 1 ... there's no shrinking possible there. */ +static void fi_shrink(struct frame_index *fi) +{ + if(fi->fill < 2) return; /* Won't shrink below 1. */ + else + { /* Double the step, half the fill. Should work as well for fill%2 = 1 */ + size_t c; + debug2("shrink index with fill %lu and step %lu", (unsigned long)fi->fill, (unsigned long)fi->step); + fi->step *= 2; + fi->fill /= 2; + /* Move the data down. */ + for(c = 0; c < fi->fill; ++c) + fi->data[c] = fi->data[2*c]; + } + + fi->next = fi_next(fi); +} + +void fi_init(struct frame_index *fi) +{ + fi->data = NULL; + fi->step = 1; + fi->fill = 0; + fi->size = 0; + fi->grow_size = 0; + fi->next = fi_next(fi); +} + +void fi_exit(struct frame_index *fi) +{ + debug2("fi_exit: %p and %lu", (void*)fi->data, (unsigned long)fi->size); + if(fi->size && fi->data != NULL) free(fi->data); + + fi_init(fi); /* Be prepared for further fun, still. */ +} + +int fi_resize(struct frame_index *fi, size_t newsize) +{ + off_t *newdata = NULL; + if(newsize == fi->size) return 0; + + if(newsize > 0 && newsize < fi->size) + { /* When we reduce buffer size a bit, shrink stuff. */ + while(fi->fill > newsize){ fi_shrink(fi); } + } + + newdata = safe_realloc(fi->data, newsize*sizeof(off_t)); + if(newsize == 0 || newdata != NULL) + { + fi->data = newdata; + fi->size = newsize; + if(fi->fill > fi->size) fi->fill = fi->size; + + fi->next = fi_next(fi); + debug2("new index of size %lu at %p", (unsigned long)fi->size, (void*)fi->data); + return 0; + } + else + { + error("failed to resize index!"); + return -1; + } +} + +void fi_add(struct frame_index *fi, off_t pos) +{ + debug3("wanting to add to fill %lu, step %lu, size %lu", (unsigned long)fi->fill, (unsigned long)fi->step, (unsigned long)fi->size); + if(fi->fill == fi->size) + { /* Index is full, we need to shrink... or grow. */ + /* Store the current frame number to check later if we still want it. */ + off_t framenum = fi->fill*fi->step; + /* If we want not / cannot grow, we shrink. */ + if( !(fi->grow_size && fi_resize(fi, fi->size+fi->grow_size)==0) ) + fi_shrink(fi); + + /* Now check if we still want to add this frame (could be that not, because of changed step). */ + if(fi->next != framenum) return; + } + /* When we are here, we want that frame. */ + if(fi->fill < fi->size) /* safeguard for size=1, or just generally */ + { + debug1("adding to index at %p", (void*)(fi->data+fi->fill)); + fi->data[fi->fill] = pos; + ++fi->fill; + fi->next = fi_next(fi); + debug3("added pos %li to index with fill %lu and step %lu", (long) pos, (unsigned long)fi->fill, (unsigned long)fi->step); + } +} + +int fi_set(struct frame_index *fi, off_t *offsets, off_t step, size_t fill) +{ + if(fi_resize(fi, fill) == -1) return -1; + fi->step = step; + if(offsets != NULL) + { + memcpy(fi->data, offsets, fill*sizeof(off_t)); + fi->fill = fill; + } + else + { + /* allocation only, no entries in index yet */ + fi->fill = 0; + } + fi->next = fi_next(fi); + debug3("set new index of fill %lu, size %lu at %p", + (unsigned long)fi->fill, (unsigned long)fi->size, (void*)fi->data); + return 0; +} + +void fi_reset(struct frame_index *fi) +{ + debug1("reset with size %"SIZE_P, (size_p)fi->size); + fi->fill = 0; + fi->step = 1; + fi->next = fi_next(fi); +} diff --git a/deps/mpg123/src/libmpg123/index.h b/deps/mpg123/src/libmpg123/index.h new file mode 100644 index 0000000..3e1ca64 --- /dev/null +++ b/deps/mpg123/src/libmpg123/index.h @@ -0,0 +1,59 @@ +#ifndef MPG123_H_INDEX +#define MPG123_H_INDEX + +/* + index: frame index data structure and functions + + This is for keeping track of frame positions for accurate seeking. + Now in it's own file, with initial code from frame.c and parse.c . + + The idea of the index with a certain amount of entries is to cover + all yet-encountered frame positions with minimal coarseness. + Meaning: At first every frame position is recorded, then, when + the index is full, every second position is trown away to make + space. Next time it is full, the same happens. And so on. + In this manner we maintain a good resolution with the given + maximum index size while covering the whole stream. + + copyright 2007-8 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Thomas Orgis +*/ + +#include "config.h" +#include "compat.h" + +struct frame_index +{ + off_t *data; /* actual data, the frame positions */ + off_t step; /* advancement in frame number per index point */ + off_t next; /* frame offset supposed to come next into the index */ + size_t size; /* total number of possible entries */ + size_t fill; /* number of used entries */ + size_t grow_size; /* if > 0: index allowed to grow on need with these steps, instead of lowering resolution */ +}; + +/* The condition for a framenum to be appended to the index. + if(FI_NEXT(fr->index, fr->num)) fi_add(offset); */ +#define FI_NEXT(fi, framenum) ((fi).size && framenum == (fi).next) + +/* Initialize stuff, set things to zero and NULL... */ +void fi_init(struct frame_index *fi); +/* Deallocate/zero things. */ +void fi_exit(struct frame_index *fi); + +/* Prepare a given size, preserving current fill, if possible. + If the new size is smaller than fill, the entry density is reduced. + Return 0 on success. */ +int fi_resize(struct frame_index *fi, size_t newsize); + +/* Append a frame position, reducing index density if needed. */ +void fi_add(struct frame_index *fi, off_t pos); + +/* Replace the frame index */ +int fi_set(struct frame_index *fi, off_t *offsets, off_t step, size_t fill); + +/* Empty the index (setting fill=0 and step=1), but keep current size. */ +void fi_reset(struct frame_index *fi); + +#endif diff --git a/deps/mpg123/src/libmpg123/intsym.h b/deps/mpg123/src/libmpg123/intsym.h new file mode 100644 index 0000000..f4ed46c --- /dev/null +++ b/deps/mpg123/src/libmpg123/intsym.h @@ -0,0 +1,256 @@ +#ifndef MPG123_INTMAP_H +#define MPG123_INTMAP_H +/* Mapping of internal mpg123 symbols to something that is less likely to conflict in case of static linking. */ +#define COS9 INT123_COS9 +#define tfcos36 INT123_tfcos36 +#define pnts INT123_pnts +#define safe_realloc INT123_safe_realloc +#define compat_open INT123_compat_open +#define compat_close INT123_compat_close +#define win32_wide_utf8 INT123_win32_wide_utf8 +#define win32_utf8_wide INT123_win32_utf8_wide +#define ntom_set_ntom INT123_ntom_set_ntom +#define synth_1to1 INT123_synth_1to1 +#define synth_1to1_dither INT123_synth_1to1_dither +#define synth_1to1_i386 INT123_synth_1to1_i386 +#define synth_1to1_i586 INT123_synth_1to1_i586 +#define synth_1to1_i586_dither INT123_synth_1to1_i586_dither +#define synth_1to1_mmx INT123_synth_1to1_mmx +#define synth_1to1_3dnow INT123_synth_1to1_3dnow +#define synth_1to1_sse INT123_synth_1to1_sse +#define synth_1to1_stereo_sse INT123_synth_1to1_stereo_sse +#define synth_1to1_3dnowext INT123_synth_1to1_3dnowext +#define synth_1to1_altivec INT123_synth_1to1_altivec +#define synth_1to1_stereo_altivec INT123_synth_1to1_stereo_altivec +#define synth_1to1_x86_64 INT123_synth_1to1_x86_64 +#define synth_1to1_stereo_x86_64 INT123_synth_1to1_stereo_x86_64 +#define synth_1to1_arm INT123_synth_1to1_arm +#define synth_1to1_neon INT123_synth_1to1_neon +#define synth_1to1_stereo_neon INT123_synth_1to1_stereo_neon +#define absynth_1to1_i486 INT123_absynth_1to1_i486 +#define synth_1to1_mono INT123_synth_1to1_mono +#define synth_1to1_m2s INT123_synth_1to1_m2s +#define synth_2to1 INT123_synth_2to1 +#define synth_2to1_dither INT123_synth_2to1_dither +#define synth_2to1_i386 INT123_synth_2to1_i386 +#define synth_2to1_mono INT123_synth_2to1_mono +#define synth_2to1_m2s INT123_synth_2to1_m2s +#define synth_4to1 INT123_synth_4to1 +#define synth_4to1_dither INT123_synth_4to1_dither +#define synth_4to1_i386 INT123_synth_4to1_i386 +#define synth_4to1_mono INT123_synth_4to1_mono +#define synth_4to1_m2s INT123_synth_4to1_m2s +#define synth_ntom INT123_synth_ntom +#define synth_ntom_mono INT123_synth_ntom_mono +#define synth_ntom_m2s INT123_synth_ntom_m2s +#define synth_1to1_8bit INT123_synth_1to1_8bit +#define synth_1to1_8bit_i386 INT123_synth_1to1_8bit_i386 +#define synth_1to1_8bit_wrap INT123_synth_1to1_8bit_wrap +#define synth_1to1_8bit_mono INT123_synth_1to1_8bit_mono +#define synth_1to1_8bit_m2s INT123_synth_1to1_8bit_m2s +#define synth_1to1_8bit_wrap_mono INT123_synth_1to1_8bit_wrap_mono +#define synth_1to1_8bit_wrap_m2s INT123_synth_1to1_8bit_wrap_m2s +#define synth_2to1_8bit INT123_synth_2to1_8bit +#define synth_2to1_8bit_i386 INT123_synth_2to1_8bit_i386 +#define synth_2to1_8bit_mono INT123_synth_2to1_8bit_mono +#define synth_2to1_8bit_m2s INT123_synth_2to1_8bit_m2s +#define synth_4to1_8bit INT123_synth_4to1_8bit +#define synth_4to1_8bit_i386 INT123_synth_4to1_8bit_i386 +#define synth_4to1_8bit_mono INT123_synth_4to1_8bit_mono +#define synth_4to1_8bit_m2s INT123_synth_4to1_8bit_m2s +#define synth_ntom_8bit INT123_synth_ntom_8bit +#define synth_ntom_8bit_mono INT123_synth_ntom_8bit_mono +#define synth_ntom_8bit_m2s INT123_synth_ntom_8bit_m2s +#define synth_1to1_real INT123_synth_1to1_real +#define synth_1to1_real_i386 INT123_synth_1to1_real_i386 +#define synth_1to1_real_sse INT123_synth_1to1_real_sse +#define synth_1to1_real_stereo_sse INT123_synth_1to1_real_stereo_sse +#define synth_1to1_real_x86_64 INT123_synth_1to1_real_x86_64 +#define synth_1to1_real_stereo_x86_64 INT123_synth_1to1_real_stereo_x86_64 +#define synth_1to1_real_altivec INT123_synth_1to1_real_altivec +#define synth_1to1_real_stereo_altivec INT123_synth_1to1_real_stereo_altivec +#define synth_1to1_real_neon INT123_synth_1to1_real_neon +#define synth_1to1_real_stereo_neon INT123_synth_1to1_real_stereo_neon +#define synth_1to1_real_mono INT123_synth_1to1_real_mono +#define synth_1to1_real_m2s INT123_synth_1to1_real_m2s +#define synth_2to1_real INT123_synth_2to1_real +#define synth_2to1_real_i386 INT123_synth_2to1_real_i386 +#define synth_2to1_real_mono INT123_synth_2to1_real_mono +#define synth_2to1_real_m2s INT123_synth_2to1_real_m2s +#define synth_4to1_real INT123_synth_4to1_real +#define synth_4to1_real_i386 INT123_synth_4to1_real_i386 +#define synth_4to1_real_mono INT123_synth_4to1_real_mono +#define synth_4to1_real_m2s INT123_synth_4to1_real_m2s +#define synth_ntom_real INT123_synth_ntom_real +#define synth_ntom_real_mono INT123_synth_ntom_real_mono +#define synth_ntom_real_m2s INT123_synth_ntom_real_m2s +#define synth_1to1_s32 INT123_synth_1to1_s32 +#define synth_1to1_s32_i386 INT123_synth_1to1_s32_i386 +#define synth_1to1_s32_sse INT123_synth_1to1_s32_sse +#define synth_1to1_s32_stereo_sse INT123_synth_1to1_s32_stereo_sse +#define synth_1to1_s32_x86_64 INT123_synth_1to1_s32_x86_64 +#define synth_1to1_s32_stereo_x86_64 INT123_synth_1to1_s32_stereo_x86_64 +#define synth_1to1_s32_altivec INT123_synth_1to1_s32_altivec +#define synth_1to1_s32_stereo_altivec INT123_synth_1to1_s32_stereo_altivec +#define synth_1to1_s32_neon INT123_synth_1to1_s32_neon +#define synth_1to1_s32_stereo_neon INT123_synth_1to1_s32_stereo_neon +#define synth_1to1_s32_mono INT123_synth_1to1_s32_mono +#define synth_1to1_s32_m2s INT123_synth_1to1_s32_m2s +#define synth_2to1_s32 INT123_synth_2to1_s32 +#define synth_2to1_s32_i386 INT123_synth_2to1_s32_i386 +#define synth_2to1_s32_mono INT123_synth_2to1_s32_mono +#define synth_2to1_s32_m2s INT123_synth_2to1_s32_m2s +#define synth_4to1_s32 INT123_synth_4to1_s32 +#define synth_4to1_s32_i386 INT123_synth_4to1_s32_i386 +#define synth_4to1_s32_mono INT123_synth_4to1_s32_mono +#define synth_4to1_s32_m2s INT123_synth_4to1_s32_m2s +#define synth_ntom_s32 INT123_synth_ntom_s32 +#define synth_ntom_s32_mono INT123_synth_ntom_s32_mono +#define synth_ntom_s32_m2s INT123_synth_ntom_s32_m2s +#define dct64 INT123_dct64 +#define dct64_i386 INT123_dct64_i386 +#define dct64_altivec INT123_dct64_altivec +#define dct64_i486 INT123_dct64_i486 +#define dct36 INT123_dct36 +#define dct36_3dnow INT123_dct36_3dnow +#define dct36_3dnowext INT123_dct36_3dnowext +#define synth_ntom_set_step INT123_synth_ntom_set_step +#define ntom_val INT123_ntom_val +#define ntom_frame_outsamples INT123_ntom_frame_outsamples +#define ntom_frmouts INT123_ntom_frmouts +#define ntom_ins2outs INT123_ntom_ins2outs +#define ntom_frameoff INT123_ntom_frameoff +#define init_layer3 INT123_init_layer3 +#define init_layer3_gainpow2 INT123_init_layer3_gainpow2 +#define init_layer3_stuff INT123_init_layer3_stuff +#define init_layer12 INT123_init_layer12 +#define init_layer12_table INT123_init_layer12_table +#define init_layer12_stuff INT123_init_layer12_stuff +#define prepare_decode_tables INT123_prepare_decode_tables +#define make_decode_tables INT123_make_decode_tables +#define make_decode_tables_mmx INT123_make_decode_tables_mmx +#define init_layer3_gainpow2_mmx INT123_init_layer3_gainpow2_mmx +#define init_layer12_table_mmx INT123_init_layer12_table_mmx +#define make_conv16to8_table INT123_make_conv16to8_table +#define do_layer3 INT123_do_layer3 +#define do_layer2 INT123_do_layer2 +#define do_layer1 INT123_do_layer1 +#define do_equalizer INT123_do_equalizer +#define dither_table_init INT123_dither_table_init +#define frame_dither_init INT123_frame_dither_init +#define invalidate_format INT123_invalidate_format +#define frame_init INT123_frame_init +#define frame_init_par INT123_frame_init_par +#define frame_outbuffer INT123_frame_outbuffer +#define frame_output_format INT123_frame_output_format +#define frame_buffers INT123_frame_buffers +#define frame_reset INT123_frame_reset +#define frame_buffers_reset INT123_frame_buffers_reset +#define frame_exit INT123_frame_exit +#define frame_index_find INT123_frame_index_find +#define frame_index_setup INT123_frame_index_setup +#define do_volume INT123_do_volume +#define do_rva INT123_do_rva +#define frame_gapless_init INT123_frame_gapless_init +#define frame_gapless_realinit INT123_frame_gapless_realinit +#define frame_gapless_update INT123_frame_gapless_update +#define frame_gapless_bytify INT123_frame_gapless_bytify +#define frame_gapless_ignore INT123_frame_gapless_ignore +#define frame_expect_outsamples INT123_frame_expect_outsamples +#define frame_skip INT123_frame_skip +#define frame_ins2outs INT123_frame_ins2outs +#define frame_outs INT123_frame_outs +#define frame_expect_outsampels INT123_frame_expect_outsampels +#define frame_offset INT123_frame_offset +#define frame_set_frameseek INT123_frame_set_frameseek +#define frame_set_seek INT123_frame_set_seek +#define frame_tell_seek INT123_frame_tell_seek +#define frame_fill_toc INT123_frame_fill_toc +#define getbits INT123_getbits +#define getcpuflags INT123_getcpuflags +#define icy2utf8 INT123_icy2utf8 +#define init_icy INT123_init_icy +#define clear_icy INT123_clear_icy +#define reset_icy INT123_reset_icy +#define init_id3 INT123_init_id3 +#define exit_id3 INT123_exit_id3 +#define reset_id3 INT123_reset_id3 +#define id3_link INT123_id3_link +#define parse_new_id3 INT123_parse_new_id3 +#define id3_to_utf8 INT123_id3_to_utf8 +#define fi_init INT123_fi_init +#define fi_exit INT123_fi_exit +#define fi_resize INT123_fi_resize +#define fi_add INT123_fi_add +#define fi_set INT123_fi_set +#define fi_reset INT123_fi_reset +#define double_to_long_rounded INT123_double_to_long_rounded +#define scale_rounded INT123_scale_rounded +#define decode_update INT123_decode_update +#define samples_to_bytes INT123_samples_to_bytes +#define bytes_to_samples INT123_bytes_to_samples +#define frame_cpu_opt INT123_frame_cpu_opt +#define set_synth_functions INT123_set_synth_functions +#define dectype INT123_dectype +#define defdec INT123_defdec +#define decclass INT123_decclass +#define check_decoders INT123_check_decoders +#define read_frame_init INT123_read_frame_init +#define frame_bitrate INT123_frame_bitrate +#define frame_freq INT123_frame_freq +#define read_frame_recover INT123_read_frame_recover +#define read_frame INT123_read_frame +#define set_pointer INT123_set_pointer +#define position_info INT123_position_info +#define compute_bpf INT123_compute_bpf +#define time_to_frame INT123_time_to_frame +#define get_songlen INT123_get_songlen +#define open_stream INT123_open_stream +#define open_stream_handle INT123_open_stream_handle +#define open_feed INT123_open_feed +#define feed_more INT123_feed_more +#define feed_forget INT123_feed_forget +#define feed_set_pos INT123_feed_set_pos +#define open_bad INT123_open_bad +#define dct64_3dnow INT123_dct64_3dnow +#define dct64_3dnowext INT123_dct64_3dnowext +#define dct64_mmx INT123_dct64_mmx +#define dct64_MMX INT123_dct64_MMX +#define dct64_sse INT123_dct64_sse +#define dct64_real_sse INT123_dct64_real_sse +#define dct64_x86_64 INT123_dct64_x86_64 +#define dct64_real_x86_64 INT123_dct64_real_x86_64 +#define dct64_neon INT123_dct64_neon +#define dct64_real_neon INT123_dct64_real_neon +#define do_equalizer_3dnow INT123_do_equalizer_3dnow +#define synth_1to1_3dnow_asm INT123_synth_1to1_3dnow_asm +#define synth_1to1_arm_asm INT123_synth_1to1_arm_asm +#define synth_1to1_arm_accurate_asm INT123_synth_1to1_arm_accurate_asm +#define synth_1to1_i586_asm INT123_synth_1to1_i586_asm +#define synth_1to1_i586_asm_dither INT123_synth_1to1_i586_asm_dither +#define synth_1to1_MMX INT123_synth_1to1_MMX +#define synth_1to1_sse_accurate_asm INT123_synth_1to1_sse_accurate_asm +#define synth_1to1_real_sse_asm INT123_synth_1to1_real_sse_asm +#define synth_1to1_s32_sse_asm INT123_synth_1to1_s32_sse_asm +#define synth_1to1_s_sse_accurate_asm INT123_synth_1to1_s_sse_accurate_asm +#define synth_1to1_real_s_sse_asm INT123_synth_1to1_real_s_sse_asm +#define synth_1to1_s32_s_sse_asm INT123_synth_1to1_s32_s_sse_asm +#define synth_1to1_s_x86_64_asm INT123_synth_1to1_s_x86_64_asm +#define synth_1to1_s_x86_64_accurate_asm INT123_synth_1to1_s_x86_64_accurate_asm +#define synth_1to1_real_s_x86_64_asm INT123_synth_1to1_real_s_x86_64_asm +#define synth_1to1_s32_s_x86_64_asm INT123_synth_1to1_s32_s_x86_64_asm +#define synth_1to1_x86_64_asm INT123_synth_1to1_x86_64_asm +#define synth_1to1_x86_64_accurate_asm INT123_synth_1to1_x86_64_accurate_asm +#define synth_1to1_real_x86_64_asm INT123_synth_1to1_real_x86_64_asm +#define synth_1to1_s32_x86_64_asm INT123_synth_1to1_s32_x86_64_asm +#define synth_1to1_neon_asm INT123_synth_1to1_neon_asm +#define synth_1to1_neon_accurate_asm INT123_synth_1to1_neon_accurate_asm +#define synth_1to1_real_neon_asm INT123_synth_1to1_real_neon_asm +#define synth_1to1_s32_neon_asm INT123_synth_1to1_s32_neon_asm +#define synth_1to1_s_neon_asm INT123_synth_1to1_s_neon_asm +#define synth_1to1_s_neon_accurate_asm INT123_synth_1to1_s_neon_accurate_asm +#define synth_1to1_real_s_neon_asm INT123_synth_1to1_real_s_neon_asm +#define synth_1to1_s32_s_neon_asm INT123_synth_1to1_s32_s_neon_asm +#define costab_mmxsse INT123_costab_mmxsse +#define make_decode_tables_mmx_asm INT123_make_decode_tables_mmx_asm +#endif diff --git a/deps/mpg123/src/libmpg123/l12_integer_tables.h b/deps/mpg123/src/libmpg123/l12_integer_tables.h new file mode 100644 index 0000000..e306fa9 --- /dev/null +++ b/deps/mpg123/src/libmpg123/l12_integer_tables.h @@ -0,0 +1,278 @@ +/* + l12_integer_tables.h: Layer1/2 Constant tables for integer decoders + + copyright 1995-2009 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#ifndef MPG123_L12_INTEGER_TABLES_H +#define MPG123_L12_INTEGER_TABLES_H + +static const real layer12_table[27][64] = +{ + { + }, + { + -1431655765,-1136305934,-901886617,-715827883,-568152967,-450943309,-357913941,-284076483, + -225471654,-178956971,-142038242,-112735827,-89478485,-71019121,-56367914,-44739243, + -35509560,-28183957,-22369621,-17754780,-14091978,-11184811,-8877390,-7045989, + -5592405,-4438695,-3522995,-2796203,-2219348,-1761497,-1398101,-1109674, + -880749,-699051,-554837,-440374,-349525,-277418,-220187,-174763, + -138709,-110094,-87381,-69355,-55047,-43691,-34677,-27523, + -21845,-17339,-13762,-10923,-8669,-6881,-5461,-4335, + -3440,-2731,-2167,-1720,-1365,-1084,-860,0 + }, + { + 1431655765,1136305934,901886617,715827883,568152967,450943309,357913941,284076483, + 225471654,178956971,142038242,112735827,89478485,71019121,56367914,44739243, + 35509560,28183957,22369621,17754780,14091978,11184811,8877390,7045989, + 5592405,4438695,3522995,2796203,2219348,1761497,1398101,1109674, + 880749,699051,554837,440374,349525,277418,220187,174763, + 138709,110094,87381,69355,55047,43691,34677,27523, + 21845,17339,13762,10923,8669,6881,5461,4335, + 3440,2731,2167,1720,1365,1084,860,0 + }, + { + 613566757,486988257,386522836,306783378,243494129,193261418,153391689,121747064, + 96630709,76695845,60873532,48315355,38347922,30436766,24157677,19173961, + 15218383,12078839,9586981,7609192,6039419,4793490,3804596,3019710, + 2396745,1902298,1509855,1198373,951149,754927,599186,475574, + 377464,299593,237787,188732,149797,118894,94366,74898, + 59447,47183,37449,29723,23591,18725,14862,11796, + 9362,7431,5898,4681,3715,2949,2341,1858, + 1474,1170,929,737,585,464,369,0 + }, + { + 286331153,227261187,180377323,143165577,113630593,90188662,71582788,56815297, + 45094331,35791394,28407648,22547165,17895697,14203824,11273583,8947849, + 7101912,5636791,4473924,3550956,2818396,2236962,1775478,1409198, + 1118481,887739,704599,559241,443870,352299,279620,221935, + 176150,139810,110967,88075,69905,55484,44037,34953, + 27742,22019,17476,13871,11009,8738,6935,5505, + 4369,3468,2752,2185,1734,1376,1092,867, + 688,546,433,344,273,217,172,0 + }, + { + 138547332,109965090,87279350,69273666,54982545,43639675,34636833,27491273, + 21819838,17318417,13745636,10909919,8659208,6872818,5454959,4329604, + 3436409,2727480,2164802,1718205,1363740,1082401,859102,681870, + 541201,429551,340935,270600,214776,170467,135300,107388, + 85234,67650,53694,42617,33825,26847,21308,16913, + 13423,10654,8456,6712,5327,4228,3356,2664, + 2114,1678,1332,1057,839,666,529,419, + 333,264,210,166,132,105,83,0 + }, + { + 68174084,54109806,42946982,34087042,27054903,21473491,17043521,13527452, + 10736745,8521761,6763726,5368373,4260880,3381863,2684186,2130440, + 1690931,1342093,1065220,845466,671047,532610,422733,335523, + 266305,211366,167762,133153,105683,83881,66576,52842, + 41940,33288,26421,20970,16644,13210,10485,8322, + 6605,5243,4161,3303,2621,2081,1651,1311, + 1040,826,655,520,413,328,260,206, + 164,130,103,82,65,52,41,0 + }, + { + 33818640,26841872,21304408,16909320,13420936,10652204,8454660,6710468, + 5326102,4227330,3355234,2663051,2113665,1677617,1331526,1056833, + 838809,665763,528416,419404,332881,264208,209702,166441, + 132104,104851,83220,66052,52426,41610,33026,26213, + 20805,16513,13106,10403,8257,6553,5201,4128, + 3277,2601,2064,1638,1300,1032,819,650, + 516,410,325,258,205,163,129,102, + 81,65,51,41,32,26,20,0 + }, + { + 16843009,13368305,10610431,8421505,6684153,5305215,4210752,3342076, + 2652608,2105376,1671038,1326304,1052688,835519,663152,526344, + 417760,331576,263172,208880,165788,131586,104440,82894, + 65793,52220,41447,32897,26110,20723,16448,13055, + 10362,8224,6527,5181,4112,3264,2590,2056, + 1632,1295,1028,816,648,514,408,324, + 257,204,162,129,102,81,64,51, + 40,32,25,20,16,13,10,0 + }, + { + 8405024,6671072,5294833,4202512,3335536,2647417,2101256,1667768, + 1323708,1050628,833884,661854,525314,416942,330927,262657, + 208471,165464,131329,104236,82732,65664,52118,41366, + 32832,26059,20683,16416,13029,10341,8208,6515, + 5171,4104,3257,2585,2052,1629,1293,1026, + 814,646,513,407,323,257,204,162, + 128,102,81,64,51,40,32,25, + 20,16,13,10,8,6,5,0 + }, + { + 4198404,3332275,2644829,2099202,1666138,1322414,1049601,833069, + 661207,524801,416534,330604,262400,208267,165302,131200, + 104134,82651,65600,52067,41325,32800,26033,20663, + 16400,13017,10331,8200,6508,5166,4100,3254, + 2583,2050,1627,1291,1025,814,646,513, + 407,323,256,203,161,128,102,81, + 64,51,40,32,25,20,16,13, + 10,8,6,5,4,3,3,0 + }, + { + 2098177,1665324,1321768,1049088,832662,660884,524544,416331, + 330442,262272,208165,165221,131136,104083,82611,65568, + 52041,41305,32784,26021,20653,16392,13010,10326, + 8196,6505,5163,4098,3253,2582,2049,1626, + 1291,1025,813,645,512,407,323,256, + 203,161,128,102,81,64,51,40, + 32,25,20,16,13,10,8,6, + 5,4,3,3,2,2,1,0 + }, + { + 1048832,832459,660723,524416,416229,330361,262208,208115, + 165181,131104,104057,82590,65552,52029,41295,32776, + 26014,20648,16388,13007,10324,8194,6504,5162, + 4097,3252,2581,2049,1626,1290,1024,813, + 645,512,406,323,256,203,161,128, + 102,81,64,51,40,32,25,20, + 16,13,10,8,6,5,4,3, + 3,2,2,1,1,1,1,0 + }, + { + 524352,416178,330321,262176,208089,165161,131088,104045, + 82580,65544,52022,41290,32772,26011,20645,16386, + 13006,10323,8193,6503,5161,4097,3251,2581, + 2048,1626,1290,1024,813,645,512,406, + 323,256,203,161,128,102,81,64, + 51,40,32,25,20,16,13,10, + 8,6,5,4,3,3,2,2, + 1,1,1,1,1,0,0,0 + }, + { + 262160,208077,165150,131080,104038,82575,65540,52019, + 41288,32770,26010,20644,16385,13005,10322,8193, + 6502,5161,4096,3251,2580,2048,1626,1290, + 1024,813,645,512,406,323,256,203, + 161,128,102,81,64,51,40,32, + 25,20,16,13,10,8,6,5, + 4,3,3,2,2,1,1,1, + 1,1,0,0,0,0,0,0 + }, + { + 131076,104035,82573,65538,52018,41286,32769,26009, + 20643,16385,13004,10322,8192,6502,5161,4096, + 3251,2580,2048,1626,1290,1024,813,645, + 512,406,323,256,203,161,128,102, + 81,64,51,40,32,25,20,16, + 13,10,8,6,5,4,3,3, + 2,2,1,1,1,1,1,0, + 0,0,0,0,0,0,0,0 + }, + { + 65537,52017,41286,32769,26008,20643,16384,13004, + 10321,8192,6502,5161,4096,3251,2580,2048, + 1626,1290,1024,813,645,512,406,323, + 256,203,161,128,102,81,64,51, + 40,32,25,20,16,13,10,8, + 6,5,4,3,3,2,2,1, + 1,1,1,1,0,0,0,0, + 0,0,0,0,0,0,0,0 + }, + { + -1717986918,-1363567121,-1082263941,-858993459,-681783560,-541131970,-429496730,-340891780, + -270565985,-214748365,-170445890,-135282993,-107374182,-85222945,-67641496,-53687091, + -42611473,-33820748,-26843546,-21305736,-16910374,-13421773,-10652868,-8455187, + -6710886,-5326434,-4227594,-3355443,-2663217,-2113797,-1677722,-1331609, + -1056898,-838861,-665804,-528449,-419430,-332902,-264225,-209715, + -166451,-132112,-104858,-83226,-66056,-52429,-41613,-33028, + -26214,-20806,-16514,-13107,-10403,-8257,-6554,-5202, + -4129,-3277,-2601,-2064,-1638,-1300,-1032,0 + }, + { + -858993459,-681783560,-541131970,-429496730,-340891780,-270565985,-214748365,-170445890, + -135282993,-107374182,-85222945,-67641496,-53687091,-42611473,-33820748,-26843546, + -21305736,-16910374,-13421773,-10652868,-8455187,-6710886,-5326434,-4227594, + -3355443,-2663217,-2113797,-1677722,-1331609,-1056898,-838861,-665804, + -528449,-419430,-332902,-264225,-209715,-166451,-132112,-104858, + -83226,-66056,-52429,-41613,-33028,-26214,-20806,-16514, + -13107,-10403,-8257,-6554,-5202,-4129,-3277,-2601, + -2064,-1638,-1300,-1032,-819,-650,-516,0 + }, + { + 858993459,681783560,541131970,429496730,340891780,270565985,214748365,170445890, + 135282993,107374182,85222945,67641496,53687091,42611473,33820748,26843546, + 21305736,16910374,13421773,10652868,8455187,6710886,5326434,4227594, + 3355443,2663217,2113797,1677722,1331609,1056898,838861,665804, + 528449,419430,332902,264225,209715,166451,132112,104858, + 83226,66056,52429,41613,33028,26214,20806,16514, + 13107,10403,8257,6554,5202,4129,3277,2601, + 2064,1638,1300,1032,819,650,516,0 + }, + { + 1717986918,1363567121,1082263941,858993459,681783560,541131970,429496730,340891780, + 270565985,214748365,170445890,135282993,107374182,85222945,67641496,53687091, + 42611473,33820748,26843546,21305736,16910374,13421773,10652868,8455187, + 6710886,5326434,4227594,3355443,2663217,2113797,1677722,1331609, + 1056898,838861,665804,528449,419430,332902,264225,209715, + 166451,132112,104858,83226,66056,52429,41613,33028, + 26214,20806,16514,13107,10403,8257,6554,5202, + 4129,3277,2601,2064,1638,1300,1032,0 + }, + { + -1908874354,-1515074579,-1202515490,-954437177,-757537289,-601257745,-477218588,-378768645, + -300628872,-238609294,-189384322,-150314436,-119304647,-94692161,-75157218,-59652324, + -47346081,-37578609,-29826162,-23673040,-18789305,-14913081,-11836520,-9394652, + -7456540,-5918260,-4697326,-3728270,-2959130,-2348663,-1864135,-1479565, + -1174332,-932068,-739783,-587166,-466034,-369891,-293583,-233017, + -184946,-146791,-116508,-92473,-73396,-58254,-46236,-36698, + -29127,-23118,-18349,-14564,-11559,-9174,-7282,-5780, + -4587,-3641,-2890,-2294,-1820,-1445,-1147,0 + }, + { + -954437177,-757537289,-601257745,-477218588,-378768645,-300628872,-238609294,-189384322, + -150314436,-119304647,-94692161,-75157218,-59652324,-47346081,-37578609,-29826162, + -23673040,-18789305,-14913081,-11836520,-9394652,-7456540,-5918260,-4697326, + -3728270,-2959130,-2348663,-1864135,-1479565,-1174332,-932068,-739783, + -587166,-466034,-369891,-293583,-233017,-184946,-146791,-116508, + -92473,-73396,-58254,-46236,-36698,-29127,-23118,-18349, + -14564,-11559,-9174,-7282,-5780,-4587,-3641,-2890, + -2294,-1820,-1445,-1147,-910,-722,-573,0 + }, + { + -477218588,-378768645,-300628872,-238609294,-189384322,-150314436,-119304647,-94692161, + -75157218,-59652324,-47346081,-37578609,-29826162,-23673040,-18789305,-14913081, + -11836520,-9394652,-7456540,-5918260,-4697326,-3728270,-2959130,-2348663, + -1864135,-1479565,-1174332,-932068,-739783,-587166,-466034,-369891, + -293583,-233017,-184946,-146791,-116508,-92473,-73396,-58254, + -46236,-36698,-29127,-23118,-18349,-14564,-11559,-9174, + -7282,-5780,-4587,-3641,-2890,-2294,-1820,-1445, + -1147,-910,-722,-573,-455,-361,-287,0 + }, + { + 477218588,378768645,300628872,238609294,189384322,150314436,119304647,94692161, + 75157218,59652324,47346081,37578609,29826162,23673040,18789305,14913081, + 11836520,9394652,7456540,5918260,4697326,3728270,2959130,2348663, + 1864135,1479565,1174332,932068,739783,587166,466034,369891, + 293583,233017,184946,146791,116508,92473,73396,58254, + 46236,36698,29127,23118,18349,14564,11559,9174, + 7282,5780,4587,3641,2890,2294,1820,1445, + 1147,910,722,573,455,361,287,0 + }, + { + 954437177,757537289,601257745,477218588,378768645,300628872,238609294,189384322, + 150314436,119304647,94692161,75157218,59652324,47346081,37578609,29826162, + 23673040,18789305,14913081,11836520,9394652,7456540,5918260,4697326, + 3728270,2959130,2348663,1864135,1479565,1174332,932068,739783, + 587166,466034,369891,293583,233017,184946,146791,116508, + 92473,73396,58254,46236,36698,29127,23118,18349, + 14564,11559,9174,7282,5780,4587,3641,2890, + 2294,1820,1445,1147,910,722,573,0 + }, + { + 1908874354,1515074579,1202515490,954437177,757537289,601257745,477218588,378768645, + 300628872,238609294,189384322,150314436,119304647,94692161,75157218,59652324, + 47346081,37578609,29826162,23673040,18789305,14913081,11836520,9394652, + 7456540,5918260,4697326,3728270,2959130,2348663,1864135,1479565, + 1174332,932068,739783,587166,466034,369891,293583,233017, + 184946,146791,116508,92473,73396,58254,46236,36698, + 29127,23118,18349,14564,11559,9174,7282,5780, + 4587,3641,2890,2294,1820,1445,1147,0 + }, +}; + +#endif diff --git a/deps/mpg123/src/libmpg123/l2tables.h b/deps/mpg123/src/libmpg123/l2tables.h new file mode 100644 index 0000000..23ed2ab --- /dev/null +++ b/deps/mpg123/src/libmpg123/l2tables.h @@ -0,0 +1,164 @@ +/* + l2tables.h: Layer 2 Alloc tables + + copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Michael Hipp + + most other tables are calculated on program start (which is (of course) not ISO-conform) + Layer-3 huffman table is in huffman.h +*/ + + +#ifndef _MPG123_L2TABLES_H_ +#define _MPG123_L2TABLES_H_ + +static const struct al_table alloc_0[] = { + {4,0},{5,3},{3,-3},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255},{10,-511}, + {11,-1023},{12,-2047},{13,-4095},{14,-8191},{15,-16383},{16,-32767}, + {4,0},{5,3},{3,-3},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255},{10,-511}, + {11,-1023},{12,-2047},{13,-4095},{14,-8191},{15,-16383},{16,-32767}, + {4,0},{5,3},{3,-3},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255},{10,-511}, + {11,-1023},{12,-2047},{13,-4095},{14,-8191},{15,-16383},{16,-32767}, + {4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127}, + {9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767}, + {4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127}, + {9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767}, + {4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127}, + {9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767}, + {4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127}, + {9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767}, + {4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127}, + {9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767}, + {4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127}, + {9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767}, + {4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127}, + {9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767}, + {4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127}, + {9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767}, + {3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767}, + {3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767}, + {3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767}, + {3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767}, + {3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767}, + {3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767}, + {3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767}, + {3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767}, + {3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767}, + {3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767}, + {3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767}, + {3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767}, + {2,0},{5,3},{7,5},{16,-32767}, + {2,0},{5,3},{7,5},{16,-32767}, + {2,0},{5,3},{7,5},{16,-32767}, + {2,0},{5,3},{7,5},{16,-32767} }; + +static const struct al_table alloc_1[] = { + {4,0},{5,3},{3,-3},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255},{10,-511}, + {11,-1023},{12,-2047},{13,-4095},{14,-8191},{15,-16383},{16,-32767}, + {4,0},{5,3},{3,-3},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255},{10,-511}, + {11,-1023},{12,-2047},{13,-4095},{14,-8191},{15,-16383},{16,-32767}, + {4,0},{5,3},{3,-3},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255},{10,-511}, + {11,-1023},{12,-2047},{13,-4095},{14,-8191},{15,-16383},{16,-32767}, + {4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127}, + {9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767}, + {4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127}, + {9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767}, + {4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127}, + {9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767}, + {4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127}, + {9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767}, + {4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127}, + {9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767}, + {4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127}, + {9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767}, + {4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127}, + {9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767}, + {4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127}, + {9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767}, + {3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767}, + {3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767}, + {3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767}, + {3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767}, + {3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767}, + {3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767}, + {3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767}, + {3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767}, + {3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767}, + {3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767}, + {3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767}, + {3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767}, + {2,0},{5,3},{7,5},{16,-32767}, + {2,0},{5,3},{7,5},{16,-32767}, + {2,0},{5,3},{7,5},{16,-32767}, + {2,0},{5,3},{7,5},{16,-32767}, + {2,0},{5,3},{7,5},{16,-32767}, + {2,0},{5,3},{7,5},{16,-32767}, + {2,0},{5,3},{7,5},{16,-32767} }; + +static const struct al_table alloc_2[] = { + {4,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255}, + {10,-511},{11,-1023},{12,-2047},{13,-4095},{14,-8191},{15,-16383}, + {4,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255}, + {10,-511},{11,-1023},{12,-2047},{13,-4095},{14,-8191},{15,-16383}, + {3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63}, + {3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63}, + {3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63}, + {3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63}, + {3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63}, + {3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63} }; + +static const struct al_table alloc_3[] = { + {4,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255}, + {10,-511},{11,-1023},{12,-2047},{13,-4095},{14,-8191},{15,-16383}, + {4,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255}, + {10,-511},{11,-1023},{12,-2047},{13,-4095},{14,-8191},{15,-16383}, + {3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63}, + {3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63}, + {3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63}, + {3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63}, + {3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63}, + {3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63}, + {3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63}, + {3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63}, + {3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63}, + {3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63} }; + +static const struct al_table alloc_4[] = { + {4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127}, + {9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{14,-8191}, + {4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127}, + {9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{14,-8191}, + {4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127}, + {9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{14,-8191}, + {4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127}, + {9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{14,-8191}, + {3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63}, + {3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63}, + {3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63}, + {3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63}, + {3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63}, + {3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63}, + {3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63}, + {2,0},{5,3},{7,5},{10,9}, + {2,0},{5,3},{7,5},{10,9}, + {2,0},{5,3},{7,5},{10,9}, + {2,0},{5,3},{7,5},{10,9}, + {2,0},{5,3},{7,5},{10,9}, + {2,0},{5,3},{7,5},{10,9}, + {2,0},{5,3},{7,5},{10,9}, + {2,0},{5,3},{7,5},{10,9}, + {2,0},{5,3},{7,5},{10,9}, + {2,0},{5,3},{7,5},{10,9}, + {2,0},{5,3},{7,5},{10,9}, + {2,0},{5,3},{7,5},{10,9}, + {2,0},{5,3},{7,5},{10,9}, + {2,0},{5,3},{7,5},{10,9}, + {2,0},{5,3},{7,5},{10,9}, + {2,0},{5,3},{7,5},{10,9}, + {2,0},{5,3},{7,5},{10,9}, + {2,0},{5,3},{7,5},{10,9}, + {2,0},{5,3},{7,5},{10,9} }; + +#endif + diff --git a/deps/mpg123/src/libmpg123/l3_integer_tables.h b/deps/mpg123/src/libmpg123/l3_integer_tables.h new file mode 100644 index 0000000..f600c31 --- /dev/null +++ b/deps/mpg123/src/libmpg123/l3_integer_tables.h @@ -0,0 +1,1002 @@ +/* + l3_integer_tables.h: Layer3 Constant tables for integer decoders + + copyright 1995-2009 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#ifndef MPG123_L3_INTEGER_TABLES_H +#define MPG123_L3_INTEGER_TABLES_H + +#ifdef PRECALC_TABLES +static const real ispow[8207] = +{ + 0,8192,20643,35445,52016,70041,89315,109695,131072,153360, + 176491,200407,225060,250408,276414,303048,330281,358087,386444,415331, + 444730,474623,504995,535830,567116,598839,630988,663552,696521,729884, + 763633,797760,832255,867112,902323,937880,973778,1010010,1046569,1083451, + 1120650,1158160,1195976,1234093,1272507,1311213,1350207,1389485,1429042,1468875, + 1508979,1549352,1589990,1630889,1672046,1713458,1755122,1797035,1839193,1881594, + 1924236,1967115,2010229,2053576,2097152,2140956,2184985,2229238,2273710,2318402, + 2363310,2408432,2453767,2499312,2545065,2591025,2637190,2683558,2730126,2776895, + 2823861,2871023,2918379,2965929,3013670,3061600,3109719,3158025,3206517,3255192, + 3304050,3353089,3402309,3451707,3501282,3551033,3600960,3651060,3701332,3751776, + 3802390,3853172,3904123,3955241,4006524,4057972,4109583,4161357,4213293,4265389, + 4317644,4370058,4422630,4475359,4528243,4581282,4634476,4687822,4741320,4794970, + 4848770,4902720,4956819,5011066,5065460,5120000,5174686,5229517,5284492,5339610, + 5394871,5450274,5505818,5561502,5617327,5673290,5729391,5785631,5842007,5898519, + 5955168,6011951,6068869,6125920,6183105,6240422,6297871,6355451,6413162,6471004, + 6528974,6587074,6645302,6703658,6762141,6820751,6879487,6938349,6997336,7056447, + 7115683,7175042,7234524,7294129,7353855,7413703,7473672,7533762,7593972,7654301, + 7714750,7775317,7836002,7896805,7957725,8018762,8079916,8141185,8202570,8264070, + 8325685,8387413,8449256,8511212,8573281,8635462,8697756,8760161,8822678,8885305, + 8948043,9010892,9073850,9136917,9200094,9263379,9326772,9390274,9453882,9517598, + 9581421,9645351,9709386,9773527,9837774,9902125,9966582,10031143,10095807,10160576, + 10225448,10290423,10355500,10420681,10485963,10551347,10616832,10682419,10748106,10813894, + 10879782,10945770,11011857,11078044,11144330,11210715,11277198,11343779,11410458,11477234, + 11544108,11611079,11678147,11745311,11812571,11879927,11947378,12014925,12082567,12150304, + 12218135,12286061,12354081,12422194,12490401,12558701,12627094,12695580,12764158,12832829, + 12901592,12970446,13039392,13108429,13177557,13246776,13316085,13385485,13454975,13524554, + 13594224,13663982,13733830,13803767,13873792,13943906,14014108,14084398,14154776,14225242, + 14295794,14366435,14437162,14507975,14578876,14649862,14720935,14792093,14863337,14934667, + 15006082,15077582,15149167,15220837,15292591,15364429,15436351,15508358,15580448,15652621, + 15724878,15797217,15869640,15942146,16014734,16087404,16160156,16232991,16305907,16378905, + 16451984,16525145,16598386,16671709,16745112,16818596,16892160,16965804,17039528,17113332, + 17187216,17261179,17335222,17409343,17483544,17557824,17632182,17706618,17781133,17855726, + 17930397,18005146,18079973,18154877,18229858,18304917,18380052,18455265,18530554,18605920, + 18681362,18756880,18832475,18908145,18983891,19059713,19135610,19211583,19287630,19363753, + 19439951,19516223,19592571,19668992,19745488,19822058,19898702,19975420,20052211,20129076, + 20206015,20283027,20360112,20437270,20514501,20591805,20669181,20746630,20824151,20901745, + 20979410,21057148,21134957,21212838,21290791,21368815,21446910,21525076,21603314,21681622, + 21760001,21838451,21916971,21995561,22074222,22152953,22231754,22310625,22389566,22468576, + 22547656,22626806,22706024,22785312,22864669,22944094,23023589,23103152,23182783,23262484, + 23342252,23422089,23501993,23581966,23662007,23742115,23822291,23902534,23982845,24063223, + 24143669,24224181,24304761,24385407,24466120,24546899,24627745,24708658,24789637,24870682, + 24951793,25032970,25114213,25195521,25276895,25358335,25439841,25521411,25603047,25684748, + 25766514,25848345,25930241,26012201,26094226,26176316,26258469,26340688,26422970,26505317, + 26587727,26670202,26752740,26835342,26918008,27000737,27083530,27166386,27249305,27332287, + 27415332,27498440,27581611,27664845,27748142,27831501,27914922,27998406,28081952,28165561, + 28249231,28332963,28416758,28500614,28584532,28668511,28752552,28836655,28920819,29005044, + 29089330,29173677,29258086,29342555,29427085,29511676,29596328,29681040,29765813,29850646, + 29935539,30020493,30105507,30190581,30275714,30360908,30446162,30531475,30616848,30702280, + 30787772,30873323,30958934,31044604,31130332,31216120,31301967,31387873,31473838,31559862, + 31645944,31732084,31818284,31904541,31990857,32077231,32163664,32250154,32336703,32423309, + 32509974,32596696,32683476,32770313,32857208,32944161,33031171,33118238,33205363,33292544, + 33379783,33467079,33554432,33641842,33729308,33816832,33904412,33992048,34079741,34167491, + 34255297,34343159,34431078,34519052,34607083,34695170,34783312,34871511,34959765,35048075, + 35136441,35224862,35313339,35401872,35490459,35579102,35667801,35756554,35845363,35934226, + 36023145,36112118,36201147,36290230,36379367,36468560,36557807,36647108,36736464,36825875, + 36915339,37004858,37094431,37184058,37273739,37363474,37453263,37543106,37633003,37722953, + 37812957,37903015,37993126,38083291,38173509,38263780,38354105,38444483,38534914,38625398, + 38715935,38806525,38897168,38987864,39078612,39169414,39260268,39351174,39442133,39533145, + 39624209,39715325,39806494,39897714,39988987,40080312,40171690,40263119,40354600,40446133, + 40537718,40629354,40721042,40812782,40904574,40996417,41088311,41180257,41272254,41364303, + 41456402,41548553,41640755,41733008,41825313,41917668,42010074,42102530,42195038,42287596, + 42380205,42472865,42565575,42658336,42751147,42844009,42936921,43029883,43122895,43215958, + 43309070,43402233,43495446,43588709,43682022,43775384,43868797,43962259,44055771,44149332, + 44242943,44336604,44430314,44524073,44617882,44711741,44805648,44899605,44993611,45087666, + 45181770,45275923,45370126,45464377,45558677,45653025,45747423,45841869,45936364,46030908, + 46125500,46220141,46314830,46409567,46504353,46599187,46694070,46789001,46883980,46979007, + 47074082,47169205,47264376,47359595,47454862,47550177,47645540,47740950,47836408,47931914, + 48027467,48123068,48218716,48314412,48410155,48505945,48601783,48697668,48793601,48889580, + 48985607,49081681,49177802,49273969,49370184,49466446,49562754,49659109,49755511,49851960, + 49948456,50044998,50141586,50238222,50334903,50431631,50528406,50625227,50722094,50819007, + 50915967,51012973,51110025,51207123,51304267,51401457,51498694,51595976,51693304,51790677, + 51888097,51985562,52083073,52180630,52278232,52375880,52473573,52571312,52669097,52766926, + 52864801,52962722,53060688,53158699,53256755,53354856,53453002,53551194,53649430,53747712, + 53846038,53944410,54042826,54141287,54239793,54338344,54436939,54535579,54634263,54732993, + 54831766,54930585,55029447,55128354,55227306,55326302,55425342,55524426,55623555,55722728, + 55821945,55921206,56020511,56119860,56219253,56318690,56418171,56517696,56617265,56716877, + 56816534,56916234,57015977,57115764,57215595,57315470,57415388,57515349,57615354,57715403, + 57815494,57915629,58015808,58116029,58216294,58316602,58416954,58517348,58617785,58718266, + 58818789,58919356,59019965,59120617,59221312,59322050,59422831,59523654,59624521,59725429, + 59826381,59927375,60028412,60129491,60230613,60331777,60432983,60534232,60635524,60736857, + 60838233,60939651,61041112,61142614,61244159,61345746,61447375,61549046,61650759,61752513, + 61854310,61956149,62058030,62159952,62261916,62363922,62465970,62568059,62670191,62772363, + 62874578,62976833,63079131,63181470,63283850,63386272,63488735,63591239,63693785,63796372, + 63899001,64001670,64104381,64207133,64309926,64412760,64515636,64618552,64721509,64824507, + 64927546,65030627,65133747,65236909,65340112,65443355,65546639,65649964,65753329,65856735, + 65960182,66063669,66167197,66270765,66374374,66478023,66581713,66685443,66789213,66893024, + 66996875,67100766,67204698,67308669,67412681,67516733,67620825,67724957,67829130,67933342, + 68037594,68141886,68246218,68350590,68455002,68559454,68663945,68768476,68873047,68977658, + 69082308,69186998,69291728,69396497,69501306,69606154,69711042,69815969,69920936,70025942, + 70130987,70236072,70341196,70446360,70551562,70656804,70762085,70867406,70972765,71078164, + 71183601,71289078,71394594,71500149,71605742,71711375,71817046,71922757,72028506,72134294, + 72240121,72345987,72451891,72557835,72663817,72769837,72875896,72981994,73088130,73194305, + 73300519,73406770,73513061,73619389,73725757,73832162,73938606,74045088,74151609,74258168, + 74364765,74471400,74578073,74684785,74791535,74898323,75005149,75112012,75218914,75325854, + 75432832,75539848,75646902,75753994,75861123,75968291,76075496,76182739,76290020,76397338, + 76504694,76612088,76719520,76826989,76934495,77042040,77149622,77257241,77364898,77472592, + 77580324,77688093,77795899,77903743,78011625,78119543,78227499,78335492,78443522,78551590, + 78659695,78767836,78876015,78984232,79092485,79200775,79309102,79417467,79525868,79634306, + 79742781,79851293,79959842,80068428,80177050,80285710,80394406,80503139,80611908,80720715, + 80829558,80938438,81047354,81156307,81265296,81374322,81483385,81592484,81701620,81810792, + 81920000,82029245,82138526,82247844,82357198,82466588,82576014,82685477,82794976,82904512, + 83014083,83123691,83233334,83343014,83452730,83562482,83672271,83782095,83891955,84001851, + 84111783,84221751,84331755,84441795,84551870,84661982,84772129,84882312,84992531,85102786, + 85213076,85323402,85433764,85544161,85654594,85765063,85875567,85986107,86096682,86207293, + 86317939,86428621,86539338,86650091,86760879,86871702,86982561,87093455,87204384,87315349, + 87426349,87537384,87648455,87759560,87870701,87981877,88093088,88204334,88315616,88426932, + 88538283,88649670,88761091,88872548,88984039,89095565,89207126,89318723,89430353,89542019, + 89653720,89765455,89877226,89989030,90100870,90212745,90324654,90436598,90548576,90660589, + 90772637,90884719,90996836,91108987,91221173,91333394,91445648,91557938,91670262,91782620, + 91895012,92007439,92119901,92232396,92344926,92457491,92570089,92682722,92795389,92908090, + 93020826,93133595,93246399,93359237,93472109,93585015,93697955,93810929,93923937,94036980, + 94150056,94263166,94376310,94489488,94602700,94715946,94829225,94942539,95055886,95169267, + 95282682,95396131,95509613,95623129,95736679,95850263,95963880,96077530,96191215,96304933, + 96418684,96532470,96646288,96760140,96874026,96987945,97101898,97215884,97329904,97443956, + 97558043,97672162,97786315,97900502,98014721,98128974,98243260,98357580,98471933,98586318, + 98700737,98815190,98929675,99044194,99158745,99273330,99387948,99502598,99617282,99731999, + 99846749,99961532,100076348,100191197,100306078,100420993,100535940,100650921,100765934,100880980, + 100996059,101111170,101226315,101341492,101456702,101571944,101687220,101802528,101917868,102033241, + 102148647,102264086,102379557,102495061,102610597,102726166,102841767,102957401,103073067,103188765, + 103304497,103420260,103536056,103651884,103767745,103883638,103999563,104115521,104231511,104347533, + 104463588,104579675,104695794,104811945,104928128,105044344,105160592,105276871,105393183,105509527, + 105625904,105742312,105858752,105975224,106091729,106208265,106324833,106441433,106558066,106674730, + 106791426,106908154,107024913,107141705,107258528,107375384,107492271,107609190,107726140,107843123, + 107960137,108077182,108194260,108311369,108428510,108545683,108662887,108780122,108897390,109014689, + 109132019,109249381,109366775,109484200,109601656,109719144,109836664,109954215,110071797,110189411, + 110307056,110424733,110542441,110660180,110777950,110895752,111013585,111131450,111249346,111367273, + 111485231,111603220,111721241,111839292,111957375,112075489,112193635,112311811,112430018,112548257, + 112666526,112784827,112903159,113021521,113139915,113258339,113376795,113495282,113613799,113732347, + 113850927,113969537,114088178,114206850,114325552,114444286,114563050,114681845,114800671,114919528, + 115038415,115157333,115276282,115395262,115514272,115633313,115752384,115871486,115990619,116109783, + 116228976,116348201,116467456,116586742,116706058,116825404,116944781,117064189,117183627,117303095, + 117422594,117542124,117661683,117781273,117900894,118020545,118140226,118259937,118379679,118499451, + 118619253,118739086,118858948,118978842,119098765,119218718,119338702,119458716,119578759,119698834, + 119818938,119939072,120059236,120179431,120299655,120419910,120540194,120660509,120780854,120901228, + 121021633,121142067,121262532,121383026,121503550,121624105,121744689,121865303,121985946,122106620, + 122227323,122348057,122468820,122589613,122710435,122831287,122952170,123073081,123194023,123314994, + 123435995,123557025,123678085,123799175,123920295,124041444,124162622,124283830,124405068,124526335, + 124647632,124768959,124890314,125011700,125133114,125254559,125376032,125497536,125619068,125740630, + 125862221,125983842,126105492,126227171,126348880,126470618,126592386,126714182,126836008,126957863, + 127079748,127201661,127323604,127445576,127567578,127689608,127811668,127933756,128055874,128178021, + 128300197,128422403,128544637,128666900,128789193,128911514,129033865,129156244,129278652,129401090, + 129523556,129646052,129768576,129891129,130013711,130136323,130258963,130381631,130504329,130627056, + 130749811,130872595,130995408,131118250,131241120,131364020,131486948,131609905,131732890,131855904, + 131978947,132102019,132225119,132348248,132471406,132594592,132717807,132841050,132964323,133087623, + 133210952,133334310,133457696,133581111,133704554,133828026,133951527,134075055,134198613,134322198, + 134445812,134569455,134693126,134816825,134940553,135064309,135188094,135311906,135435747,135559617, + 135683515,135807441,135931395,136055378,136179388,136303427,136427495,136551590,136675714,136799866, + 136924046,137048254,137172490,137296755,137421048,137545368,137669717,137794094,137918499,138042932, + 138167393,138291882,138416400,138540945,138665518,138790119,138914748,139039405,139164090,139288803, + 139413544,139538313,139663110,139787934,139912787,140037667,140162575,140287511,140412475,140537467, + 140662486,140787533,140912608,141037711,141162842,141288000,141413186,141538399,141663641,141788910, + 141914207,142039531,142164883,142290263,142415670,142541105,142666567,142792057,142917575,143043120, + 143168693,143294294,143419921,143545577,143671260,143796970,143922708,144048473,144174266,144300086, + 144425934,144551809,144677712,144803641,144929599,145055583,145181595,145307635,145433701,145559795, + 145685917,145812065,145938241,146064445,146190675,146316933,146443218,146569530,146695869,146822236, + 146948630,147075051,147201499,147327974,147454477,147581007,147707563,147834147,147960758,148087396, + 148214061,148340754,148467473,148594219,148720993,148847793,148974620,149101475,149228356,149355264, + 149482200,149609162,149736151,149863167,149990210,150117280,150244377,150371501,150498652,150625829, + 150753033,150880265,151007523,151134807,151262119,151389457,151516823,151644215,151771633,151899079, + 152026551,152154050,152281576,152409128,152536707,152664313,152791945,152919604,153047290,153175002, + 153302741,153430507,153558299,153686118,153813963,153941835,154069734,154197659,154325610,154453588, + 154581593,154709624,154837682,154965766,155093876,155222013,155350177,155478367,155606583,155734826, + 155863095,155991391,156119713,156248061,156376436,156504837,156633264,156761718,156890198,157018704, + 157147237,157275796,157404381,157532993,157661630,157790294,157918985,158047701,158176444,158305212, + 158434008,158562829,158691676,158820550,158949449,159078375,159207327,159336305,159465310,159594340, + 159723396,159852479,159981587,160110722,160239882,160369069,160498282,160627520,160756785,160886076, + 161015392,161144735,161274103,161403498,161532918,161662365,161791837,161921335,162050859,162180409, + 162309985,162439587,162569215,162698868,162828547,162958252,163087983,163217740,163347523,163477331, + 163607165,163737025,163866910,163996822,164126759,164256722,164386710,164516724,164646764,164776830, + 164906921,165037038,165167181,165297349,165427543,165557762,165688007,165818278,165948574,166078896, + 166209243,166339616,166470015,166600439,166730888,166861363,166991864,167122390,167252942,167383519, + 167514122,167644750,167775403,167906082,168036786,168167516,168298271,168429052,168559858,168690689, + 168821546,168952428,169083335,169214268,169345226,169476210,169607219,169738253,169869312,170000397, + 170131507,170262642,170393802,170524988,170656199,170787435,170918696,171049983,171181295,171312632, + 171443994,171575381,171706793,171838231,171969694,172101182,172232695,172364233,172495796,172627384, + 172758997,172890636,173022299,173153988,173285702,173417440,173549204,173680993,173812806,173944645, + 174076509,174208397,174340311,174472249,174604213,174736201,174868215,175000253,175132316,175264404, + 175396517,175528655,175660818,175793005,175925218,176057455,176189717,176322004,176454316,176586653, + 176719014,176851400,176983811,177116247,177248708,177381193,177513703,177646237,177778797,177911381, + 178043990,178176624,178309282,178441965,178574672,178707405,178840162,178972943,179105749,179238580, + 179371435,179504316,179637220,179770149,179903103,180036082,180169084,180302112,180435164,180568240, + 180701342,180834467,180967617,181100792,181233991,181367214,181500462,181633735,181767032,181900353, + 182033699,182167069,182300464,182433883,182567326,182700794,182834286,182967803,183101344,183234909, + 183368499,183502113,183635751,183769414,183903101,184036812,184170548,184304307,184438092,184571900, + 184705732,184839589,184973470,185107376,185241305,185375259,185509237,185643239,185777266,185911316, + 186045391,186179490,186313613,186447760,186581931,186716126,186850346,186984590,187118857,187253149, + 187387465,187521805,187656169,187790557,187924969,188059405,188193866,188328350,188462858,188597390, + 188731946,188866527,189001131,189135759,189270411,189405087,189539787,189674511,189809259,189944031, + 190078827,190213646,190348490,190483357,190618249,190753164,190888103,191023066,191158052,191293063, + 191428097,191563155,191698237,191833343,191968473,192103626,192238803,192374004,192509229,192644477, + 192779749,192915045,193050365,193185708,193321075,193456466,193591881,193727319,193862781,193998266, + 194133775,194269308,194404864,194540444,194676048,194811675,194947326,195083001,195218699,195354421, + 195490166,195625935,195761727,195897543,196033383,196169246,196305132,196441042,196576976,196712933, + 196848914,196984918,197120945,197256996,197393071,197529169,197665290,197801435,197937603,198073795, + 198210010,198346249,198482510,198618796,198755104,198891437,199027792,199164171,199300573,199436998, + 199573447,199709919,199846415,199982934,200119476,200256041,200392630,200529242,200665877,200802535, + 200939217,201075922,201212650,201349402,201486176,201622974,201759795,201896639,202033507,202170398, + 202307311,202444248,202581209,202718192,202855198,202992228,203129281,203266357,203403456,203540578, + 203677723,203814891,203952082,204089297,204226534,204363795,204501078,204638385,204775715,204913067, + 205050443,205187842,205325264,205462708,205600176,205737667,205875180,206012717,206150277,206287859, + 206425465,206563093,206700745,206838419,206976116,207113836,207251579,207389345,207527134,207664946, + 207802780,207940638,208078518,208216421,208354347,208492295,208630267,208768261,208906279,209044319, + 209182381,209320467,209458575,209596706,209734860,209873037,210011236,210149458,210287703,210425971, + 210564261,210702574,210840910,210979268,211117649,211256053,211394480,211532929,211671400,211809895, + 211948412,212086952,212225514,212364099,212502706,212641337,212779989,212918665,213057363,213196083, + 213334826,213473592,213612380,213751191,213890024,214028880,214167758,214306659,214445582,214584528, + 214723497,214862488,215001501,215140537,215279595,215418676,215557779,215696904,215836053,215975223, + 216114416,216253631,216392869,216532129,216671412,216810717,216950044,217089394,217228766,217368160, + 217507577,217647016,217786477,217925961,218065467,218204996,218344546,218484119,218623715,218763332, + 218902972,219042634,219182319,219322026,219461754,219601506,219741279,219881075,220020893,220160733, + 220300595,220440479,220580386,220720315,220860266,221000239,221140235,221280252,221420292,221560354, + 221700438,221840544,221980672,222120823,222260995,222401190,222541406,222681645,222821906,222962189, + 223102494,223242821,223383170,223523541,223663934,223804350,223944787,224085246,224225728,224366231, + 224506756,224647303,224787873,224928464,225069077,225209712,225350370,225491049,225631750,225772473, + 225913218,226053985,226194773,226335584,226476417,226617271,226758148,226899046,227039966,227180908, + 227321872,227462858,227603865,227744895,227885946,228027019,228168114,228309231,228450369,228591529, + 228732712,228873916,229015141,229156389,229297658,229438949,229580262,229721596,229862953,230004331, + 230145730,230287152,230428595,230570060,230711546,230853055,230994585,231136136,231277709,231419304, + 231560921,231702559,231844219,231985901,232127604,232269329,232411076,232552844,232694633,232836445, + 232978278,233120132,233262008,233403906,233545825,233687766,233829728,233971712,234113717,234255744, + 234397793,234539863,234681954,234824068,234966202,235108358,235250536,235392735,235534955,235677197, + 235819461,235961746,236104052,236246380,236388729,236531100,236673492,236815905,236958340,237100797, + 237243274,237385774,237528294,237670836,237813399,237955984,238098590,238241217,238383866,238526536, + 238669228,238811940,238954674,239097430,239240207,239383005,239525824,239668664,239811526,239954409, + 240097314,240240240,240383187,240526155,240669144,240812155,240955187,241098240,241241314,241384410, + 241527527,241670665,241813824,241957005,242100206,242243429,242386673,242529938,242673224,242816532, + 242959860,243103210,243246581,243389973,243533386,243676820,243820276,243963752,244107249,244250768, + 244394308,244537869,244681450,244825053,244968677,245112322,245255989,245399676,245543384,245687113, + 245830863,245974635,246118427,246262240,246406074,246549930,246693806,246837703,246981621,247125560, + 247269521,247413502,247557504,247701527,247845571,247989635,248133721,248277828,248421956,248566104, + 248710273,248854464,248998675,249142907,249287160,249431434,249575729,249720044,249864381,250008738, + 250153116,250297515,250441935,250586375,250730837,250875319,251019822,251164346,251308890,251453456, + 251598042,251742649,251887277,252031925,252176594,252321284,252465995,252610727,252755479,252900252, + 253045045,253189860,253334695,253479551,253624427,253769324,253914242,254059181,254204140,254349120, + 254494121,254639142,254784184,254929246,255074329,255219433,255364558,255509703,255654868,255800054, + 255945261,256090489,256235737,256381006,256526295,256671605,256816935,256962286,257107657,257253049, + 257398462,257543895,257689349,257834823,257980318,258125833,258271369,258416925,258562502,258708099, + 258853717,258999355,259145014,259290693,259436392,259582112,259727853,259873614,260019395,260165197, + 260311019,260456862,260602725,260748609,260894513,261040437,261186382,261332347,261478333,261624339, + 261770365,261916411,262062478,262208566,262354674,262500802,262646950,262793119,262939308,263085517, + 263231747,263377997,263524267,263670558,263816869,263963200,264109551,264255923,264402315,264548728, + 264695160,264841613,264988086,265134579,265281093,265427627,265574181,265720755,265867349,266013964, + 266160599,266307254,266453929,266600625,266747340,266894076,267040832,267187608,267334404,267481221, + 267628057,267774914,267921791,268068688,268215605,268362542,268509500,268656477,268803475,268950493, + 269097530,269244588,269391666,269538764,269685882,269833021,269980179,270127357,270274555,270421774, + 270569012,270716271,270863549,271010848,271158166,271305505,271452863,271600242,271747640,271895059, + 272042497,272189956,272337434,272484933,272632451,272779990,272927548,273075126,273222724,273370342, + 273517981,273665639,273813316,273961014,274108732,274256470,274404227,274552005,274699802,274847619, + 274995456,275143313,275291190,275439087,275587003,275734940,275882896,276030872,276178868,276326884, + 276474919,276622975,276771050,276919145,277067260,277215394,277363549,277511723,277659917,277808130, + 277956364,278104617,278252890,278401183,278549496,278697828,278846180,278994552,279142943,279291354, + 279439785,279588236,279736706,279885196,280033706,280182236,280330785,280479353,280627942,280776550, + 280925178,281073825,281222493,281371179,281519886,281668612,281817358,281966123,282114908,282263713, + 282412537,282561381,282710244,282859127,283008030,283156952,283305894,283454855,283603836,283752836, + 283901856,284050896,284199955,284349034,284498132,284647250,284796387,284945544,285094721,285243917, + 285393132,285542367,285691621,285840895,285990189,286139502,286288834,286438186,286587557,286736948, + 286886358,287035788,287185237,287334706,287484194,287633701,287783228,287932774,288082340,288231925, + 288381530,288531154,288680797,288830460,288980142,289129844,289279565,289429305,289579065,289728844, + 289878642,290028460,290178297,290328153,290478029,290627924,290777839,290927773,291077726,291227698, + 291377690,291527701,291677731,291827781,291977850,292127938,292278045,292428172,292578318,292728484, + 292878668,293028872,293179095,293329337,293479599,293629880,293780180,293930499,294080837,294231195, + 294381572,294531968,294682383,294832818,294983272,295133744,295284237,295434748,295585278,295735828, + 295886396,296036984,296187591,296338218,296488863,296639527,296790211,296940914,297091636,297242377, + 297393137,297543916,297694714,297845532,297996368,298147224,298298098,298448992,298599905,298750837, + 298901788,299052758,299203747,299354755,299505782,299656829,299807894,299958978,300110081,300261204, + 300412345,300563505,300714685,300865883,301017101,301168337,301319592,301470867,301622160,301773472, + 301924804,302076154,302227523,302378911,302530318,302681744,302833189,302984653,303136136,303287638, + 303439159,303590698,303742257,303893834,304045431,304197046,304348680,304500333,304652005,304803696, + 304955405,305107134,305258881,305410648,305562433,305714237,305866060,306017901,306169762,306321641, + 306473539,306625456,306777392,306929347,307081320,307233312,307385323,307537353,307689402,307841469, + 307993555,308145660,308297784,308449927,308602088,308754268,308906467,309058684,309210921,309363176, + 309515449,309667742,309820053,309972383,310124732,310277099,310429485,310581890,310734313,310886755, + 311039216,311191696,311344194,311496711,311649247,311801801,311954374,312106965,312259575,312412204, + 312564852,312717518,312870203,313022906,313175628,313328369,313481128,313633906,313786703,313939518, + 314092351,314245204,314398074,314550964,314703872,314856799,315009744,315162708,315315690,315468691, + 315621710,315774748,315927805,316080880,316233973,316387086,316540216,316693365,316846533,316999719, + 317152924,317306147,317459389,317612649,317765928,317919225,318072541,318225875,318379228,318532599, + 318685988,318839396,318992823,319146268,319299731,319453213,319606713,319760232,319913769,320067324, + 320220898,320374491,320528101,320681731,320835378,320989044,321142729,321296431,321450153,321603892, + 321757650,321911426,322065221,322219034,322372865,322526715,322680583,322834470,322988374,323142297, + 323296239,323450199,323604177,323758173,323912188,324066221,324220272,324374342,324528430,324682536, + 324836660,324990803,325144964,325299144,325453341,325607557,325761791,325916044,326070314,326224603, + 326378910,326533236,326687579,326841941,326996321,327150720,327305136,327459571,327614024,327768495, + 327922984,328077492,328232018,328386562,328541124,328695704,328850302,329004919,329159554,329314207, + 329468878,329623567,329778275,329933000,330087744,330242506,330397286,330552084,330706900,330861735, + 331016587,331171458,331326347,331481254,331636178,331791121,331946083,332101062,332256059,332411074, + 332566108,332721159,332876229,333031317,333186422,333341546,333496688,333651848,333807026,333962221, + 334117435,334272667,334427917,334583185,334738471,334893776,335049098,335204438,335359796,335515172, + 335670566,335825978,335981408,336136856,336292322,336447806,336603308,336758828,336914365,337069921, + 337225495,337381087,337536696,337692324,337847969,338003633,338159314,338315013,338470730,338626465, + 338782218,338937989,339093778,339249585,339405409,339561252,339717112,339872990,340028886,340184800, + 340340732,340496682,340652650,340808635,340964638,341120659,341276698,341432755,341588830,341744922, + 341901032,342057161,342213306,342369470,342525652,342681851,342838068,342994303,343150556,343306826, + 343463115,343619421,343775745,343932086,344088446,344244823,344401218,344557631,344714061,344870509, + 345026975,345183459,345339960,345496480,345653016,345809571,345966143,346122733,346279341,346435967, + 346592610,346749271,346905949,347062646,347219359,347376091,347532840,347689607,347846392,348003194, + 348160014,348316852,348473707,348630580,348787471,348944379,349101305,349258249,349415210,349572189, + 349729185,349886199,350043231,350200280,350357347,350514432,350671534,350828653,350985791,351142946, + 351300118,351457308,351614516,351771741,351928984,352086244,352243522,352400817,352558130,352715461, + 352872809,353030175,353187558,353344959,353502377,353659813,353817266,353974737,354132225,354289731, + 354447254,354604795,354762354,354919929,355077523,355235134,355392762,355550408,355708071,355865752, + 356023450,356181166,356338899,356496649,356654418,356812203,356970006,357127826,357285664,357443520, + 357601392,357759282,357917190,358075115,358233057,358391017,358548994,358706989,358865001,359023030, + 359181077,359339141,359497223,359655322,359813438,359971572,360129723,360287891,360446077,360604280, + 360762501,360920738,361078994,361237266,361395556,361553863,361712188,361870530,362028889,362187265, + 362345659,362504070,362662499,362820944,362979407,363137888,363296385,363454900,363613432,363771982, + 363930549,364089133,364247734,364406353,364564988,364723642,364882312,365041000,365199704,365358426, + 365517166,365675922,365834696,365993487,366152296,366311121,366469964,366628824,366787701,366946595, + 367105507,367264435,367423381,367582344,367741325,367900322,368059337,368218369,368377418,368536484, + 368695567,368854668,369013785,369172920,369332072,369491241,369650428,369809631,369968852,370128089, + 370287344,370446616,370605905,370765211,370924535,371083875,371243232,371402607,371561999,371721408, + 371880833,372040276,372199737,372359214,372518708,372678219,372837748,372997293,373156856,373316435, + 373476032,373635645,373795276,373954924,374114589,374274270,374433969,374593685,374753418,374913168, + 375072935,375232719,375392520,375552338,375712173,375872025,376031894,376191780,376351683,376511603, + 376671540,376831494,376991465,377151453,377311458,377471479,377631518,377791574,377951647,378111736, + 378271843,378431966,378592107,378752264,378912439,379072630,379232838,379393063,379553305,379713564, + 379873840,380034133,380194443,380354769,380515113,380675473,380835850,380996244,381156655,381317083, + 381477528,381637990,381798468,381958964,382119476,382280005,382440551,382601114,382761694,382922290, + 383082903,383243534,383404181,383564844,383725525,383886223,384046937,384207668,384368416,384529181, + 384689962,384850761,385011576,385172408,385333256,385494122,385655004,385815903,385976819,386137752, + 386298701,386459667,386620650,386781650,386942667,387103700,387264750,387425816,387586900,387748000, + 387909117,388070251,388231401,388392568,388553752,388714952,388876170,389037404,389198654,389359922, + 389521206,389682507,389843824,390005158,390166509,390327877,390489261,390650662,390812079,390973513, + 391134964,391296432,391457916,391619417,391780934,391942469,392104019,392265587,392427171,392588772, + 392750389,392912023,393073674,393235341,393397025,393558725,393720442,393882176,394043926,394205693, + 394367477,394529277,394691093,394852927,395014776,395176643,395338526,395500425,395662342,395824274, + 395986224,396148189,396310172,396472171,396634186,396796218,396958267,397120332,397282414,397444512, + 397606627,397768758,397930906,398093070,398255251,398417448,398579662,398741892,398904139,399066402, + 399228682,399390979,399553291,399715621,399877966,400040329,400202707,400365103,400527514,400689943, + 400852387,401014848,401177326,401339820,401502330,401664857,401827400,401989960,402152536,402315129, + 402477738,402640363,402803005,402965664,403128338,403291030,403453737,403616461,403779201,403941958, + 404104731,404267521,404430327,404593149,404755988,404918843,405081715,405244602,405407507,405570427, + 405733364,405896317,406059287,406222273,406385275,406548294,406711329,406874381,407037448,407200532, + 407363633,407526750,407689883,407853032,408016198,408179380,408342578,408505793,408669024,408832271, + 408995534,409158814,409322110,409485423,409648751,409812096,409975457,410138835,410302229,410465639, + 410629065,410792508,410955967,411119442,411282933,411446441,411609964,411773505,411937061,412100633, + 412264222,412427827,412591449,412755086,412918740,413082410,413246096,413409798,413573517,413737251, + 413901002,414064769,414228553,414392352,414556168,414720000,414883848,415047712,415211593,415375489, + 415539402,415703331,415867276,416031238,416195215,416359209,416523218,416687244,416851286,417015344, + 417179419,417343509,417507616,417671738,417835877,418000032,418164203,418328390,418492594,418656813, + 418821048,418985300,419149568,419313852,419478151,419642467,419806800,419971148,420135512,420299892, + 420464289,420628701,420793130,420957574,421122035,421286511,421451004,421615513,421780038,421944579, + 422109136,422273709,422438298,422602903,422767524,422932161,423096814,423261483,423426168,423590870, + 423755587,423920320,424085069,424249834,424414616,424579413,424744226,424909055,425073900,425238762, + 425403639,425568532,425733441,425898366,426063307,426228264,426393237,426558226,426723231,426888252, + 427053288,427218341,427383410,427548494,427713595,427878711,428043844,428208992,428374156,428539337, + 428704533,428869745,429034973,429200217,429365476,429530752,429696043,429861351,430026674,430192013, + 430357369,430522740,430688126,430853529,431018948,431184382,431349833,431515299,431680781,431846279, + 432011793,432177323,432342868,432508430,432674007,432839600,433005209,433170834,433336474,433502131, + 433667803,433833491,433999195,434164914,434330650,434496401,434662168,434827951,434993750,435159565, + 435325395,435491241,435657103,435822981,435988874,436154784,436320709,436486650,436652606,436818579, + 436984567,437150571,437316590,437482626,437648677,437814744,437980827,438146925,438313039,438479169, + 438645315,438811476,438977653,439143846,439310055,439476279,439642519,439808775,439975046,440141333, + 440307636,440473955,440640289,440806639,440973005,441139386,441305783,441472196,441638624,441805068, + 441971528,442138004,442304495,442471002,442637524,442804062,442970616,443137185,443303770,443470371, + 443636988,443803620,443970267,444136931,444303610,444470304,444637014,444803740,444970482,445137239, + 445304012,445470800,445637604,445804423,445971259,446138109,446304976,446471858,446638755,446805668, + 446972597,447139542,447306501,447473477,447640468,447807475,447974497,448141535,448308588,448475657, + 448642742,448809842,448976957,449144088,449311235,449478397,449645575,449812768,449979977,450147202, + 450314442,450481697,450648968,450816255,450983557,451150874,451318207,451485556,451652920,451820300, + 451987695,452155105,452322531,452489973,452657430,452824903,452992391,453159894,453327413,453494948, + 453662498,453830063,453997644,454165240,454332852,454500480,454668122,454835781,455003454,455171143, + 455338848,455506568,455674303,455842054,456009821,456177602,456345399,456513212,456681040,456848884, + 457016742,457184617,457352506,457520411,457688332,457856268,458024219,458192186,458360168,458528165, + 458696178,458864207,459032250,459200309,459368384,459536474,459704579,459872699,460040835,460208986, + 460377153,460545335,460713532,460881745,461049973,461218216,461386475,461554749,461723039,461891343, + 462059663,462227999,462396350,462564716,462733097,462901494,463069906,463238333,463406776,463575234, + 463743707,463912196,464080699,464249219,464417753,464586303,464754868,464923448,465092044,465260655, + 465429281,465597922,465766579,465935251,466103938,466272641,466441358,466610091,466778840,466947603, + 467116382,467285176,467453985,467622810,467791650,467960505,468129375,468298260,468467161,468636077, + 468805008,468973954,469142916,469311893,469480885,469649892,469818914,469987952,470157005,470326073, + 470495156,470664254,470833368,471002497,471171641,471340800,471509974,471679164,471848368,472017588, + 472186823,472356073,472525339,472694619,472863915,473033226,473202552,473371893,473541249,473710620, + 473880007,474049409,474218825,474388257,474557704,474727167,474896644,475066136,475235644,475405167, + 475574704,475744257,475913825,476083408,476253007,476422620,476592248,476761892,476931550,477101224, + 477270913,477440617,477610336,477780070,477949819,478119583,478289362,478459157,478628966,478798790, + 478968630,479138484,479308354,479478239,479648138,479818053,479987983,480157928,480327888,480497863, + 480667853,480837858,481007878,481177913,481347963,481518028,481688108,481858203,482028313,482198438, + 482368578,482538734,482708904,482879089,483049289,483219504,483389734,483559979,483730240,483900515, + 484070805,484241110,484411430,484581765,484752115,484922480,485092860,485263254,485433664,485604089, + 485774529,485944983,486115453,486285938,486456437,486626952,486797481,486968025,487138585,487309159, + 487479748,487650352,487820971,487991605,488162254,488332917,488503596,488674290,488844998,489015721, + 489186460,489357213,489527981,489698764,489869562,490040374,490211202,490382044,490552902,490723774, + 490894661,491065563,491236480,491407412,491578358,491749320,491920296,492091287,492262294,492433314, + 492604350,492775401,492946466,493117547,493288642,493459752,493630876,493802016,493973171,494144340, + 494315524,494486723,494657937,494829165,495000409,495171667,495342940,495514228,495685530,495856848, + 496028180,496199527,496370889,496542265,496713657,496885063,497056484,497227919,497399370,497570835, + 497742315,497913810,498085320,498256844,498428383,498599937,498771506,498943089,499114687,499286300, + 499457928,499629570,499801227,499972899,500144586,500316287,500488003,500659734,500831480,501003240, + 501175015,501346805,501518609,501690428,501862262,502034111,502205974,502377852,502549745,502721652, + 502893574,503065511,503237462,503409429,503581409,503753405,503925415,504097440,504269480,504441534, + 504613603,504785686,504957785,505129897,505302025,505474167,505646324,505818496,505990682,506162883, + 506335098,506507328,506679573,506851833,507024107,507196395,507368699,507541017,507713349,507885697, + 508058058,508230435,508402826,508575232,508747652,508920087,509092536,509265000,509437479,509609972, + 509782480,509955003,510127540,510300092,510472658,510645239,510817834,510990444,511163069,511335708, + 511508362,511681030,511853713,512026411,512199123,512371849,512544590,512717346,512890116,513062901, + 513235701,513408514,513581343,513754186,513927043,514099916,514272802,514445703,514618619,514791549, + 514964494,515137453,515310427,515483415,515656418,515829435,516002467,516175513,516348574,516521649, + 516694739,516867844,517040962,517214096,517387243,517560406,517733582,517906774,518079979,518253200, + 518426434,518599683,518772947,518946225,519119518,519292825,519466146,519639482,519812833,519986197, + 520159577,520332970,520506379,520679801,520853238,521026690,521200156,521373636,521547131,521720640, + 521894164,522067702,522241255,522414822,522588403,522761999,522935609,523109234,523282873,523456526, + 523630194,523803876,523977573,524151284,524325009,524498749,524672503,524846272,525020055,525193852, + 525367664,525541490,525715330,525889185,526063054,526236938,526410836,526584748,526758675,526932616, + 527106571,527280541,527454525,527628524,527802536,527976563,528150605,528324661,528498731,528672815, + 528846914,529021027,529195155,529369297,529543453,529717623,529891808,530066007,530240220,530414448, + 530588690,530762946,530937217,531111502,531285801,531460115,531634442,531808785,531983141,532157512, + 532331897,532506296,532680709,532855137,533029579,533204036,533378506,533552991,533727490,533902004, + 534076531,534251073,534425630,534600200,534774785,534949384,535123997,535298624,535473266,535647922, + 535822592,535997276,536171975,536346688,536521415,536696156,536870912,537045682,537220466,537395264, + 537570076,537744903,537919744,538094599,538269468,538444352,538619249,538794161,538969087,539144028, + 539318982,539493951,539668934,539843931,540018942,540193967,540369007,540544060,540719128,540894210, + 541069307,541244417,541419542,541594680,541769833,541945000,542120182,542295377,542470587,542645810, + 542821048,542996300,543171566,543346846,543522141,543697449,543872772,544048109,544223460,544398825, + 544574204,544749597,544925004,545100426,545275862,545451311,545626775,545802253,545977745,546153251, + 546328772,546504306,546679854,546855417,547030994,547206584,547382189,547557808,547733441,547909088, + 548084749,548260425,548436114,548611817,548787535,548963266,549139012,549314771,549490545,549666333, + 549842135,550017950,550193780,550369624,550545482,550721354,550897241,551073141,551249055,551424983, + 551600925,551776882,551952852,552128836,552304835,552480847,552656873,552832914,553008968,553185037, + 553361119,553537215,553713326,553889450,554065589,554241741,554417908,554594088,554770283,554946491, + 555122714,555298950,555475201,555651465,555827743,556004036,556180342,556356662,556532997,556709345, + 556885707,557062083,557238473,557414877,557591295,557767727,557944173,558120633,558297107,558473595, + 558650097,558826612,559003142,559179686,559356243,559532814,559709400,559885999,560062612,560239240, + 560415881,560592536,560769205,560945887,561122584,561299295,561476019,561652758,561829510,562006276, + 562183057,562359851,562536659,562713480,562890316,563067166,563244029,563420907,563597798,563774703, + 563951622,564128555,564305502,564482463,564659437,564836426,565013428,565190444,565367474,565544518, + 565721576,565898647,566075733,566252832,566429945,566607072,566784213,566961368,567138536,567315719, + 567492915,567670125,567847349,568024586,568201838,568379103,568556382,568733675,568910982,569088303, + 569265637,569442985,569620347,569797723,569975113,570152516,570329933,570507365,570684809,570862268, + 571039740,571217227,571394727,571572240,571749768,571927309,572104865,572282433,572460016,572637613, + 572815223,572992847,573170485,573348136,573525802,573703481,573881173,574058880,574236600,574414334, + 574592082,574769844,574947619,575125408,575303211,575481028,575658858,575836702,576014560,576192431, + 576370316,576548215,576726128,576904054,577081994,577259948,577437916,577615897,577793892,577971901, + 578149923,578327959,578506009,578684072,578862149,579040240,579218345,579396463,579574595,579752741, + 579930900,580109073,580287260,580465460,580643674,580821902,581000143,581178399,581356667,581534950, + 581713246,581891555,582069879,582248216,582426567,582604931,582783309,582961701,583140106,583318525, + 583496958,583675404,583853864,584032337,584210825,584389325,584567840,584746368,584924910,585103465, + 585282034,585460616,585639213,585817822,585996446,586175083,586353733,586532398,586711076,586889767, + 587068472,587247191,587425923,587604669,587783428,587962201,588140988,588319788,588498602,588677429, + 588856270,589035125,589213993,589392875,589571770,589750679,589929601,590108537,590287487,590466450, + 590645427,590824417,591003421,591182438,591361469,591540513,591719571,591898643,592077728,592256827, + 592435939,592615065,592794204,592973357,593152523,593331703,593510896,593690103,593869324,594048558, + 594227805,594407066,594586341,594765629,594944930,595124245,595303574,595482916,595662271,595841640, + 596021023,596200419,596379829,596559252,596738688,596918138,597097602,597277079,597456569,597636073, + 597815591,597995122,598174666,598354224,598533795,598713380,598892979,599072590,599252216,599431854, + 599611506,599791172,599970851,600150544,600330250,600509969,600689702,600869448,601049208,601228981, + 601408768,601588568,601768381,601948208,602128049,602307902,602487770,602667650,602847544,603027452, + 603207373,603387307,603567255,603747216,603927191,604107179,604287180,604467195,604647223,604827265, + 605007320,605187388,605367470,605547565,605727674,605907796,606087931,606268080,606448242,606628417, + 606808606,606988808,607169024,607349253,607529496,607709751,607890020,608070303,608250599,608430908, + 608611231,608791566,608971916,609152278,609332654,609513044,609693446,609873862,610054292,610234735, + 610415191,610595660,610776143,610956639,611137148,611317671,611498207,611678756,611859319,612039895, + 612220484,612401087,612581703,612762332,612942975,613123631,613304300,613484983,613665679,613846388, + 614027110,614207846,614388595,614569357,614750133,614930922,615111724,615292540,615473368,615654210, + 615835066,616015934,616196816,616377712,616558620,616739542,616920477,617101425,617282386,617463361, + 617644349,617825351,618006365,618187393,618368434,618549488,618730556,618911637,619092731,619273838, + 619454959,619636093,619817240,619998400,620179573,620360760,620541960,620723173,620904400,621085639, + 621266892,621448158,621629438,621810730,621992036,622173355,622354687,622536032,622717391,622898763, + 623080148,623261546,623442957,623624382,623805820,623987271,624168735,624350212,624531703,624713207, + 624894724,625076254,625257797,625439354,625620923,625802506,625984102,626165711,626347334,626528969, + 626710618,626892280,627073955,627255643,627437344,627619058,627800786,627982527,628164281,628346048, + 628527828,628709621,628891428,629073248,629255080,629436926,629618785,629800658,629982543,630164441, + 630346353,630528278,630710215,630892166,631074130,631256108,631438098,631620101,631802118,631984147, + 632166190,632348246,632530315,632712397,632894492,633076600,633258722,633440856,633623004,633805164, + 633987338,634169525,634351725,634533938,634716164,634898403,635080655,635262921,635445199,635627490, + 635809795,635992113,636174443,636356787,636539144,636721514,636903896,637086292,637268701,637451123, + 637633559,637816007,637998468,638180942,638363430,638545930,638728443,638910970,639093509,639276062, + 639458627,639641206,639823797,640006402,640189020,640371650,640554294,640736951,640919621,641102303, + 641284999,641467708,641650430,641833165,642015912,642198673,642381447,642564234,642747034,642929846, + 643112672,643295511,643478363,643661228,643844105,644026996,644209900,644392817,644575746,644758689, + 644941645,645124613,645307595,645490590,645673597,645856618,646039651,646222698,646405757,646588830, + 646771915,646955013,647138125,647321249,647504386,647687536,647870699,648053875,648237064,648420266, + 648603481,648786709,648969949,649153203,649336470,649519749,649703042,649886347,650069665,650252997, + 650436341,650619698,650803068,650986451,651169847,651353255,651536677,651720112,651903559,652087020, + 652270493,652453979,652637478,652820990,653004515,653188053,653371604,653555167,653738744,653922333, + 654105935,654289550,654473178,654656819,654840473,655024140,655207819,655391512,655575217,655758935, + 655942666,656126410,656310167,656493936,656677719,656861514,657045322,657229143,657412977,657596824, + 657780683,657964556,658148441,658332339,658516250,658700174,658884111,659068060,659252023,659435998, + 659619986,659803987,659988000,660172027,660356066,660540118,660724183,660908261,661092351,661276455, + 661460571,661644700,661828842,662012997,662197164,662381344,662565538,662749743,662933962,663118194, + 663302438,663486695,663670965,663855247,664039543,664223851,664408172,664592506,664776853,664961212, + 665145584,665329969,665514367,665698777,665883200,666067636,666252085,666436547,666621021,666805508, + 666990008,667174521,667359046,667543584,667728135,667912699,668097275,668281864,668466466,668651081, + 668835708,669020348,669205001,669389667,669574345,669759036,669943740,670128456,670313185,670497927, + 670682682,670867450,671052230,671237023,671421828,671606647,671791478,671976321,672161178,672346047, + 672530929,672715823,672900731,673085651,673270583,673455529,673640487,673825458,674010441,674195437, + 674380446,674565468,674750502,674935549,675120609,675305681,675490766,675675863,675860974,676046097, + 676231232,676416381,676601542,676786716,676971902,677157101,677342313,677527537,677712774,677898024, + 678083286,678268561,678453849,678639149,678824462,679009787,679195126,679380477,679565840,679751216, + 679936605,680122006,680307421,680492847,680678287,680863739,681049203,681234680,681420170,681605673, + 681791188,681976716,682162256,682347809,682533374,682718953,682904543,683090147,683275763,683461391, + 683647033,683832687,684018353,684204032,684389724,684575428,684761145,684946874,685132616,685318371, + 685504138,685689918,685875710,686061515,686247332,686433163,686619005,686804861,686990728,687176609, + 687362502,687548407,687734325,687920256,688106199,688292155,688478123,688664104,688850098,689036104, + 689222122,689408154,689594197,689780254,689966322,690152404,690338498,690524604,690710723,690896854, + 691082998,691269155,691455324,691641506,691827700,692013907,692200126,692386358,692572602,692758859, + 692945128,693131410,693317704,693504011,693690330,693876662,694063007,694249364,694435733,694622115, + 694808509,694994916,695181336,695367768,695554212,695740669,695927138,696113620,696300115,696486621, + 696673141,696859673,697046217,697232774,697419343,697605925,697792519,697979126,698165745,698352377, + 698539021,698725677,698912347,699099028,699285722,699472429,699659147,699845879,700032623,700219379, + 700406148,700592929,700779723,700966529,701153347,701340178,701527022,701713878,701900746,702087627, + 702274520,702461425,702648343,702835274,703022217,703209172,703396140,703583120,703770113,703957118, + 704144135,704331165,704518208,704705262,704892329,705079409,705266501,705453605,705640722,705827851, + 706014993,706202147,706389313,706576492,706763683,706950887,707138103,707325331,707512572,707699825, + 707887090,708074368,708261659,708448961,708636276,708823604,709010944,709198296,709385660,709573037, + 709760427,709947828,710135242,710322669,710510107,710697559,710885022,711072498,711259986,711447487, + 711635000,711822525,712010063,712197613,712385175,712572750,712760337,712947936,713135548,713323172, + 713510808,713698457,713886118,714073791,714261477,714449175,714636885,714824608,715012343,715200090, + 715387850,715575622,715763406,715951203,716139012,716326833,716514667,716702513,716890371,717078242, + 717266124,717454019,717641927,717829847,718017779,718205723,718393680,718581648,718769630,718957623, + 719145629,719333647,719521677,719709720,719897775,720085842,720273922,720462013,720650117,720838234, + 721026362,721214503,721402656,721590822,721778999,721967189,722155392,722343606,722531833,722720072, + 722908323,723096587,723284862,723473150,723661451,723849763,724038088,724226425,724414774,724603136, + 724791509,724979895,725168294,725356704,725545127,725733562,725922009,726110468,726298940,726487424, + 726675920,726864428,727052949,727241481,727430026,727618583,727807153,727995734,728184328,728372934, + 728561553,728750183,728938826,729127480,729316148,729504827,729693518,729882222,730070938,730259666, + 730448406,730637159,730825923,731014700,731203489,731392290,731581104,731769929,731958767,732147617, + 732336479,732525353,732714240,732903139,733092049,733280972,733469908,733658855,733847814,734036786, + 734225770,734414766,734603774,734792794,734981827,735170871,735359928,735548997,735738078,735927171, + 736116277,736305394,736494524,736683666,736872820,737061986,737251164,737440354,737629557,737818771, + 738007998,738197237,738386488,738575751,738765026,738954314,739143613,739332925,739522249,739711585, + 739900933,740090293,740279665,740469049,740658446,740847854,741037275,741226708,741416152,741605609, + 741795078,741984560,742174053,742363558,742553076,742742605,742932147,743121701,743311266,743500844, + 743690434,743880036,744069651,744259277,744448915,744638566,744828228,745017903,745207589,745397288, + 745586999,745776721,745966456,746156203,746345962,746535733,746725517,746915312,747105119,747294938, + 747484770,747674613,747864469,748054336,748244216,748434107,748624011,748813927,749003855,749193794, + 749383746,749573710,749763686,749953674,750143674,750333686,750523710,750713746,750903794,751093854, + 751283926,751474011,751664107,751854215,752044335,752234467,752424612,752614768,752804936,752995117, + 753185309,753375513,753565729,753755958,753946198,754136450,754326715,754516991,754707279,754897580, + 755087892,755278216,755468553,755658901,755849261,756039633,756230018,756420414,756610822,756801242, + 756991675,757182119,757372575,757563043,757753523,757944015,758134519,758325035,758515563,758706103, + 758896655,759087219,759277794,759468382,759658982,759849593,760040217,760230853,760421500,760612160, + 760802831,760993514,761184210,761374917,761565636,761756367,761947110,762137866,762328632,762519411, + 762710202,762901005,763091820,763282646,763473485,763664335,763855198,764046072,764236958,764427856, + 764618767,764809689,765000622,765191568,765382526,765573496,765764477,765955471,766146476,766337493, + 766528523,766719564,766910617,767101682,767292758,767483847,767674948,767866060,768057185,768248321, + 768439469,768630629,768821801,769012985,769204180,769395388,769586607,769777839,769969082,770160337, + 770351604,770542883,770734174,770925476,771116791,771308117,771499455,771690805,771882167,772073541, + 772264926,772456324,772647733,772839155,773030588,773222032,773413489,773604958,773796438,773987931, + 774179435,774370951,774562479,774754018,774945570,775137133,775328708,775520295,775711894,775903505, + 776095127,776286762,776478408,776670066,776861736,777053417,777245111,777436816,777628533,777820262, + 778012003,778203755,778395520,778587296,778779084,778970884,779162695,779354519,779546354,779738201, + 779930060,780121930,780313813,780505707,780697613,780889531,781081460,781273402,781465355,781657320, + 781849297,782041285,782233285,782425297,782617321,782809357,783001404,783193464,783385535,783577617, + 783769712,783961818,784153936,784346066,784538208,784730361,784922526,785114703,785306892,785499092, + 785691304,785883528,786075764,786268012,786460271,786652542,786844824,787037119,787229425,787421743, + 787614073,787806414,787998767,788191132,788383509,788575897,788768297,788960709,789153133,789345568, + 789538015,789730474,789922944,790115426,790307920,790500426,790692943,790885472,791078013,791270566, + 791463130,791655706,791848294,792040893,792233504,792426127,792618762,792811408,793004066,793196735, + 793389417,793582110,793774814,793967531,794160259,794352999,794545750,794738513,794931288,795124075, + 795316873,795509683,795702505,795895338,796088183,796281039,796473908,796666788,796859680,797052583, + 797245498,797438425,797631363,797824313,798017275,798210248,798403233,798596230,798789238,798982258, + 799175290,799368333,799561388,799754455,799947533,800140623,800333725,800526838,800719963,800913099, + 801106248,801299407,801492579,801685762,801878957,802072163,802265381,802458611,802651852,802845105, + 803038370,803231646,803424934,803618233,803811544,804004867,804198201,804391547,804584905,804778274, + 804971654,805165047,805358451,805551866,805745294,805938733,806132183,806325645,806519119,806712604, + 806906101,807099609,807293129,807486661,807680204,807873759,808067326,808260904,808454493,808648094, + 808841707,809035332,809228968,809422615,809616274,809809945,810003627,810197321,810391027,810584744, + 810778472,810972213,811165964,811359728,811553503,811747289,811941087,812134897,812328718,812522551, + 812716395,812910251,813104118,813297997,813491888,813685790,813879703,814073628,814267565,814461513, + 814655473,814849445,815043427,815237422,815431428,815625445,815819475,816013515,816207567,816401631, + 816595706,816789793,816983891,817178001,817372122,817566255,817760400,817954555,818148723,818342902, + 818537092,818731294,818925508,819119733,819313969,819508217,819702477,819896748,820091031,820285325, + 820479630,820673947,820868276,821062616,821256968,821451331,821645705,821840091,822034489,822228898, + 822423319,822617751,822812194,823006649,823201116,823395594,823590083,823784584,823979097,824173621, + 824368156,824562703,824757261,824951831,825146413,825341005,825535610,825730225,825924853,826119491, + 826314141,826508803,826703476,826898160,827092856,827287564,827482283,827677013,827871755,828066508, + 828261273,828456049,828650837,828845636,829040446,829235268,829430102,829624946,829819803,830014670, + 830209550,830404440,830599342,830794256,830989181,831184117,831379065,831574024,831768994,831963976, + 832158970,832353975,832548991,832744019,832939058,833134109,833329170,833524244,833719329,833914425, + 834109533,834304652,834499782,834694924,834890077,835085242,835280418,835475605,835670804,835866015, + 836061236,836256469,836451714,836646970,836842237,837037516,837232806,837428107,837623420,837818744, + 838014080,838209427,838404785,838600155,838795536,838990928,839186332,839381747,839577174,839772612, + 839968061,840163522,840358994,840554478,840749972,840945479,841140996,841336525,841532065,841727617, + 841923180,842118754,842314340,842509937,842705546,842901165,843096797,843292439,843488093,843683758, + 843879435,844075122,844270822,844466532,844662254,844857987,845053732,845249488,845445255,845641034, + 845836823,846032625,846228437,846424261,846620096,846815943,847011801,847207670,847403550,847599442, + 847795345,847991260,848187186,848383123,848579071,848775031,848971002,849166984,849362978,849558983, + 849754999,849951027,850147065,850343116,850539177,850735250,850931334,851127429,851323536,851519654, + 851715783,851911924,852108076,852304239,852500413,852696599,852892796,853089004,853285224,853481454, + 853677697,853873950,854070215,854266491,854462778,854659076,854855386,855051707,855248039,855444383, + 855640738,855837104,856033481,856229870,856426270,856622681,856819103,857015537,857211982,857408438, + 857604905,857801384,857997874,858194375,858390888,858587411,858783946,858980492,859177050,859373619, + 859570198,859766790,859963392,860160006,860356630,860553267,860749914,860946572,861143242,861339923, + 861536615,861733319,861930034,862126760,862323497,862520245,862717005,862913775,863110557,863307351, + 863504155,863700971,863897798,864094636,864291485,864488346,864685217,864882100,865078994,865275900, + 865472816,865669744,865866683,866063633,866260595,866457567,866654551,866851546,867048552,867245569, + 867442598,867639637,867836688,868033750,868230823,868427908,868625004,868822110,869019228,869216357, + 869413498,869610649,869807812,870004986,870202171,870399367,870596574,870793793,870991023,871188264, + 871385516,871582779,871780053,871977339,872174635,872371943,872569262,872766592,872963934,873161286, + 873358650,873556024,873753410,873950807,874148216,874345635,874543065,874740507,874937960,875135424, + 875332899,875530385,875727882,875925391,876122910,876320441,876517983,876715536,876913100,877110675, + 877308262,877505859,877703468,877901088,878098719,878296361,878494014,878691678,878889353,879087040, + 879284737,879482446,879680166,879877897,880075639,880273392,880471156,880668932,880866718,881064516, + 881262324,881460144,881657975,881855817,882053670,882251534,882449409,882647296,882845193,883043102, + 883241021,883438952,883636894,883834847,884032811,884230786,884428772,884626769,884824777,885022797, + 885220827,885418869,885616921,885814985,886013060,886211145,886409242,886607350,886805469,887003599, + 887201741,887399893,887598056,887796230,887994416,888192612,888390820,888589038,888787268,888985509, + 889183760,889382023,889580297,889778582,889976878,890175185,890373503,890571832,890770172,890968523, + 891166885,891365258,891563643,891762038,891960444,892158862,892357290,892555729,892754180,892952641, + 893151114,893349597,893548092,893746597,893945114,894143642,894342180,894540730,894739291,894937862, + 895136445,895335039,895533644,895732259,895930886,896129524,896328173,896526833,896725503,896924185, + 897122878,897321582,897520297,897719022,897917759,898116507,898315266,898514036,898712816,898911608, + 899110411,899309225,899508050,899706885,899905732,900104590,900303458,900502338,900701229,900900130, + 901099043,901297967,901496901,901695847,901894803,902093771,902292749,902491739,902690739,902889750, + 903088773,903287806,903486850,903685906,903884972,904084049,904283137,904482236,904681346,904880467, + 905079599,905278742,905477896,905677061,905876237,906075423,906274621,906473829,906673049,906872279, + 907071521,907270773,907470037,907669311,907868596,908067892,908267199,908466517,908665846,908865186, + 909064537,909263899,909463271,909662655,909862049,910061455,910260871,910460298,910659737,910859186, + 911058646,911258117,911457599,911657091,911856595,912056110,912255635,912455172,912654719,912854277, + 913053846,913253426,913453017,913652619,913852232,914051856,914251490,914451136,914650792,914850459, + 915050138,915249827,915449527,915649237,915848959,916048692,916248435,916448190,916647955,916847731, + 917047518,917247316,917447125,917646945,917846775,918046617,918246469,918446332,918646206,918846091, + 919045987,919245894,919445811,919645740,919845679,920045629,920245590,920445562,920645545,920845538, + 921045543,921245558,921445584,921645621,921845669,922045728,922245797,922445878,922645969,922846071, + 923046184,923246308,923446443,923646588,923846745,924046912,924247090,924447279,924647479,924847689, + 925047911,925248143,925448386,925648640,925848904,926049180,926249466,926449764,926650072,926850391, + 927050720,927251061,927451412,927651774,927852147,928052531,928252926,928453331,928653747,928854174, + 929054612,929255061,929455521,929655991,929856472,930056964,930257467,930457980,930658504,930859040, + 931059586,931260142,931460710,931661288,931861877,932062477,932263088,932463709,932664342,932864985, + 933065639,933266303,933466979,933667665,933868362,934069070,934269789,934470518,934671258,934872009, + 935072771,935273543,935474326,935675120,935875925,936076741,936277567,936478404,936679252,936880111, + 937080980,937281861,937482751,937683653,937884566,938085489,938286423,938487368,938688323,938889289, + 939090266,939291254,939492253,939693262,939894282,940095313,940296354,940497407,940698470,940899543, + 941100628,941301723,941502829,941703946,941905073,942106212,942307361,942508520,942709691,942910872, + 943112064,943313266,943514480,943715704,943916938,944118184,944319440,944520707,944721985,944923273, + 945124572,945325882,945527203,945728534,945929876,946131229,946332592,946533966,946735351,946936747, + 947138153,947339570,947540998,947742436,947943885,948145345,948346815,948548297,948749789,948951291, + 949152804,949354328,949555863,949757409,949958965,950160531,950362109,950563697,950765296,950966905, + 951168526,951370156,951571798,951773450,951975113,952176787,952378471,952580166,952781872,952983588, + 953185315,953387053,953588801,953790560,953992330,954194110,954395901,954597703,954799515,955001338, + 955203172,955405016,955606871,955808737,956010613,956212500,956414398,956616306,956818225,957020155, + 957222095,957424046,957626008,957827980,958029963,958231956,958433960,958635975,958838001,959040037, + 959242083,959444141,959646209,959848287,960050377,960252477,960454587,960656708,960858840,961060983, + 961263136,961465299,961667474,961869659,962071854,962274060,962476277,962678505,962880743,963082991, + 963285251,963487521,963689801,963892092,964094394,964296707,964499030,964701363,964903707,965106062, + 965308428,965510804,965713190,965915588,966117995,966320414,966522843,966725283,966927733,967130194, + 967332665,967535147,967737640,967940143,968142657,968345181,968547716,968750262,968952818,969155385, + 969357962,969560550,969763149,969965758,970168378,970371008,970573649,970776300,970978962,971181635, + 971384318,971587011,971789716,971992431,972195156,972397892,972600639,972803396,973006163,973208942, + 973411731,973614530,973817340,974020160,974222991,974425833,974628685,974831548,975034421,975237305, + 975440200,975643105,975846020,976048946,976251883,976454830,976657788,976860756,977063735,977266724, + 977469724,977672734,977875755,978078787,978281829,978484881,978687944,978891018,979094102,979297197, + 979500302,979703418,979906544,980109681,980312828,980515986,980719154,980922333,981125523,981328723, + 981531933,981735154,981938386,982141628,982344880,982548143,982751417,982954701,983157995,983361300, + 983564616,983767942,983971279,984174626,984377983,984581352,984784730,984988119,985191519,985394929, + 985598350,985801781,986005222,986208675,986412137,986615610,986819094,987022588,987226092,987429608, + 987633133,987836669,988040216,988243773,988447340,988650918,988854506,989058105,989261715,989465335, + 989668965,989872606,990076257,990279919,990483591,990687274,990890967,991094671,991298385,991502109, + 991705844,991909590,992113346,992317112,992520889,992724677,992928475,993132283,993336102,993539931, + 993743770,993947620,994151481,994355352,994559234,994763125,994967028,995170941,995374864,995578798, + 995782742,995986696,996190661,996394637,996598623,996802619,997006626,997210643,997414671,997618709, + 997822757,998026816,998230886,998434965,998639056,998843156,999047267,999251389,999455521,999659663, + 999863816,1000067979,1000272153,1000476337,1000680531,1000884736,1001088952,1001293177,1001497413,1001701660, + 1001905917,1002110184,1002314462,1002518750,1002723049,1002927358,1003131677,1003336007,1003540347,1003744698, + 1003949059,1004153430,1004357812,1004562204,1004766607,1004971020,1005175443,1005379877,1005584321,1005788776, + 1005993241,1006197716,1006402202,1006606698,1006811205,1007015722,1007220249,1007424787,1007629335,1007833893, + 1008038462,1008243041,1008447631,1008652231,1008856841,1009061462,1009266093,1009470734,1009675386,1009880048, + 1010084721,1010289404,1010494097,1010698801,1010903515,1011108239,1011312974,1011517719,1011722475,1011927241, + 1012132017,1012336803,1012541600,1012746407,1012951225,1013156053,1013360891,1013565740,1013770599,1013975469, + 1014180348,1014385238,1014590139,1014795050,1014999971,1015204902,1015409844,1015614796,1015819759,1016024732, + 1016229715,1016434708,1016639712,1016844726,1017049751,1017254786,1017459831,1017664886,1017869952,1018075028, + 1018280115,1018485212,1018690319,1018895436,1019100564,1019305702,1019510851,1019716009,1019921179,1020126358, + 1020331548,1020536748,1020741958,1020947179,1021152410,1021357651,1021562903,1021768165,1021973437,1022178719, + 1022384012,1022589315,1022794629,1022999953,1023205287,1023410631,1023615986,1023821351,1024026726,1024232111, + 1024437507,1024642913,1024848330,1025053757,1025259194,1025464641,1025670099,1025875566,1026081045,1026286533, + 1026492032,1026697541,1026903060,1027108590,1027314130,1027519680,1027725240,1027930811,1028136392,1028341984, + 1028547585,1028753197,1028958819,1029164451,1029370094,1029575747,1029781410,1029987084,1030192768,1030398462, + 1030604166,1030809880,1031015605,1031221340,1031427086,1031632841,1031838607,1032044383,1032250170,1032455966, + 1032661773,1032867590,1033073418,1033279255,1033485103,1033690961,1033896830,1034102708,1034308597,1034514496, + 1034720406,1034926325,1035132255,1035338195,1035544146,1035750106,1035956077,1036162058,1036368050,1036574051, + 1036780063,1036986085,1037192117,1037398160,1037604212,1037810275,1038016348,1038222432,1038428526,1038634629, + 1038840743,1039046868,1039253002,1039459147,1039665302,1039871467,1040077643,1040283828,1040490024,1040696230, + 1040902446,1041108673,1041314910,1041521157,1041727414,1041933681,1042139959,1042346246,1042552544,1042758852, + 1042965171,1043171499,1043377838,1043584187,1043790546,1043996916,1044203295,1044409685,1044616085,1044822495, + 1045028916,1045235346,1045441787,1045648238,1045854699,1046061170,1046267652,1046474144,1046680645,1046887158, + 1047093680,1047300212,1047506755,1047713308,1047919871,1048126444,1048333027,1048539621,1048746224,1048952838, + 1049159462,1049366097,1049572741,1049779396,1049986060,1050192735,1050399420,1050606116,1050812821,1051019537, + 1051226262,1051432998,1051639744,1051846500,1052053267,1052260043,1052466830,1052673627,1052880434,1053087251, + 1053294079,1053500916,1053707764,1053914622,1054121489,1054328368,1054535256,1054742154,1054949063,1055155981, + 1055362910,1055569849,1055776798,1055983758,1056190727,1056397707,1056604696,1056811696,1057018706,1057225726, + 1057432756,1057639797,1057846847,1058053908,1058260979,1058468059,1058675150,1058882252,1059089363,1059296484, + 1059503616,1059710757,1059917909,1060125071,1060332243,1060539425,1060746617,1060953820,1061161032,1061368255, + 1061575488,1061782730,1061989983,1062197246,1062404520,1062611803,1062819096,1063026400,1063233713,1063441037, + 1063648371,1063855715,1064063069,1064270433,1064477807,1064685192,1064892586,1065099990,1065307405,1065514830, + 1065722265,1065929709,1066137164,1066344630,1066552105,1066759590,1066967085,1067174591,1067382106,1067589632, + 1067797168,1068004714,1068212269,1068419835,1068627411,1068834998,1069042594,1069250200,1069457816,1069665443, + 1069873079,1070080726,1070288383,1070496049,1070703726,1070911413,1071119110,1071326817,1071534534,1071742261, + 1071949998,1072157746,1072365503,1072573270,1072781048,1072988835,1073196633,1073404441,1073612258,1073820086, + 1074027924,1074235772,1074443630,1074651498,1074859376,1075067264,1075275162,1075483070,1075690988,1075898917, + 1076106855,1076314803,1076522762,1076730730,1076938709,1077146697,1077354696,1077562705,1077770723,1077978752, + 1078186791,1078394839,1078602898,1078810967,1079019046,1079227135,1079435234,1079643343,1079851462,1080059591, + 1080267730,1080475879,1080684038,1080892207,1081100386,1081308576,1081516775,1081724984,1081933203,1082141432, + 1082349672,1082557921,1082766180,1082974450,1083182729,1083391018,1083599318,1083807627,1084015947,1084224276, + 1084432615,1084640965,1084849324,1085057694,1085266073,1085474462,1085682862,1085891271,1086099691,1086308120, + 1086516560,1086725009,1086933468,1087141938,1087350417,1087558907,1087767406,1087975915,1088184435,1088392964, + 1088601503,1088810053,1089018612,1089227181,1089435761,1089644350,1089852949,1090061559,1090270178,1090478807, + 1090687446,1090896095,1091104754,1091313424,1091522103,1091730792,1091939491,1092148200,1092356919,1092565648, + 1092774387,1092983136,1093191894,1093400663,1093609442,1093818231,1094027030,1094235838,1094444657,1094653486, + 1094862324,1095071173,1095280031,1095488900,1095697778,1095906666,1096115565,1096324473,1096533391,1096742319, + 1096951257,1097160206,1097369164,1097578132,1097787109,1097996097,1098205095,1098414103,1098623121,1098832148, + 1099041186,1099250233,1099459291,1099668358,1099877435,1100086523,1100295620,1100504727,1100713844,1100922971, + 1101132108,1101341255,1101550412,1101759578,1101968755,1102177942,1102387138,1102596345,1102805561,1103014787, + 1103224023,1103433270,1103642526,1103851792,1104061067,1104270353,1104479649,1104688955,1104898270,1105107596, + 1105316931,1105526276,1105735631,1105944997,1106154372,1106363756,1106573151,1106782556,1106991971,1107201395, + 1107410830,1107620274,1107829728,1108039192,1108248667,1108458150,1108667644,1108877148,1109086662,1109296185, + 1109505719,1109715262,1109924815,1110134378,1110343951,1110553534,1110763127,1110972730,1111182342,1111391965, + 1111601597,1111811239,1112020891,1112230553,1112440225,1112649907,1112859598,1113069300,1113279011,1113488733, + 1113698464,1113908205,1114117956,1114327716,1114537487,1114747267,1114957058,1115166858,1115376668,1115586488, + 1115796318,1116006157,1116216007,1116425866,1116635736,1116845615,1117055504,1117265403,1117475311,1117685230, + 1117895158,1118105097,1118315045,1118525003,1118734971,1118944948,1119154936,1119364933,1119574941,1119784958, + 1119994985,1120205022,1120415068,1120625125,1120835191,1121045267,1121255353,1121465449,1121675555,1121885670, + 1122095796,1122305931,1122516076,1122726231,1122936396,1123146570,1123356755,1123566949,1123777153,1123987367, + 1124197590,1124407824,1124618067,1124828321,1125038584,1125248856,1125459139,1125669432,1125879734,1126090046, + 1126300368,1126510700,1126721041,1126931393,1127141754,1127352125,1127562506,1127772897,1127983297,1128193707, + 1128404127,1128614557,1128824997,1129035447,1129245906,1129456375,1129666854,1129877343,1130087841,1130298350, + 1130508868,1130719396,1130929934,1131140481,1131351039,1131561606,1131772183,1131982769,1132193366,1132403972, + 1132614588,1132825214,1133035850,1133246496,1133457151,1133667816,1133878491,1134089176,1134299870,1134510574, + 1134721288,1134932012,1135142746,1135353489,1135564242,1135775005,1135985778,1136196560,1136407352,1136618154, + 1136828966,1137039788,1137250619,1137461460,1137672311,1137883172,1138094042,1138304922,1138515812,1138726712, + 1138937622,1139148541,1139359470,1139570409,1139781357,1139992315,1140203284,1140414261,1140625249,1140836246, + 1141047253,1141258270,1141469297,1141680333,1141891379,1142102435,1142313501,1142524576,1142735661,1142946756, + 1143157861,1143368975,1143580099,1143791233,1144002377,1144213530,1144424693,1144635866,1144847048,1145058241, + 1145269443,1145480655,1145691876,1145903107,1146114348,1146325599,1146536859,1146748130,1146959410,1147170699, + 1147381999,1147593308,1147804626,1148015955,1148227293,1148438641,1148649999,1148861367,1149072744,1149284131, + 1149495527,1149706934,1149918350,1150129775,1150341211,1150552656,1150764111,1150975576,1151187050,1151398534, + 1151610028,1151821531,1152033044,1152244567,1152456100,1152667642,1152879194,1153090756,1153302327,1153513909, + 1153725499,1153937100,1154148710,1154360330,1154571960,1154783599,1154995248,1155206907,1155418575,1155630253, + 1155841941,1156053639,1156265346,1156477063,1156688789,1156900526,1157112272,1157324027,1157535793,1157747568, + 1157959352,1158171147,1158382951,1158594765,1158806588,1159018421,1159230264,1159442116,1159653979,1159865850, + 1160077732,1160289623,1160501524,1160713435,1160925355,1161137285,1161349224,1161561173,1161773132,1161985101, + 1162197079,1162409067,1162621064,1162833072,1163045089,1163257115,1163469151,1163681197,1163893253,1164105318, + 1164317393,1164529477,1164741571,1164953675,1165165789,1165377912,1165590045,1165802187,1166014339,1166226501, + 1166438672,1166650853,1166863044,1167075244,1167287454,1167499674,1167711903,1167924142,1168136390,1168348649, + 1168560916,1168773194,1168985481,1169197778,1169410084,1169622400,1169834726,1170047061,1170259406,1170471761, + 1170684125,1170896499,1171108882,1171321275,1171533678,1171746090,1171958512,1172170944,1172383385,1172595836, + 1172808296,1173020766,1173233246,1173445735,1173658234,1173870743,1174083261,1174295789,1174508326,1174720873, + 1174933430,1175145996,1175358572,1175571158,1175783753,1175996357,1176208972,1176421596,1176634229,1176846872, + 1177059525,1177272187,1177484859,1177697541,1177910232,1178122933,1178335643,1178548363,1178761093,1178973832, + 1179186581,1179399339,1179612107,1179824884,1180037672,1180250468,1180463275,1180676090,1180888916,1181101751, + 1181314596,1181527450,1181740314,1181953187,1182166070,1182378963,1182591865,1182804777,1183017698,1183230629, + 1183443570,1183656520,1183869480,1184082449,1184295428,1184508416,1184721414,1184934422,1185147439,1185360465, + 1185573502,1185786548,1185999603,1186212668,1186425743,1186638827,1186851920,1187065024,1187278136,1187491259, + 1187704391,1187917532,1188130683,1188343844,1188557014,1188770194,1188983383,1189196582,1189409790,1189623008, + 1189836236,1190049473,1190262720,1190475976,1190689242,1190902517,1191115802,1191329096,1191542400,1191755713, + 1191969036,1192182369,1192395711,1192609063,1192822424,1193035795,1193249175,1193462565,1193675964,1193889373, + 1194102791,1194316219,1194529657,1194743104,1194956561,1195170027,1195383502,1195596987,1195810482,1196023986, + 1196237500,1196451023,1196664556,1196878099,1197091650,1197305212,1197518783,1197732363,1197945953,1198159553, + 1198373162,1198586780,1198800408,1199014046,1199227693,1199441349,1199655015,1199868691,1200082376,1200296071, + 1200509775,1200723489,1200937212,1201150944,1201364687,1201578438,1201792200,1202005970,1202219750,1202433540, + 1202647339,1202861148,1203074966,1203288794,1203502631,1203716478,1203930334,1204144200,1204358075,1204571960, + 1204785854,1204999758,1205213671,1205427594,1205641526,1205855467,1206069419,1206283379,1206497349,1206711329, + 1206925318,1207139317,1207353325,1207567342,1207781369,1207995406,1208209452,1208423507,1208637572,1208851647, + 1209065731,1209279824,1209493927,1209708039,1209922161,1210136293,1210350433,1210564584,1210778743,1210992912, + 1211207091,1211421279,1211635477,1211849684,1212063900,1212278126,1212492362,1212706607,1212920861,1213135125, + 1213349398,1213563681,1213777973,1213992275,1214206586,1214420907,1214635237,1214849576,1215063925,1215278284, + 1215492652,1215707029,1215921416,1216135812,1216350218,1216564633,1216779057,1216993491,1217207935,1217422388, + 1217636850,1217851322,1218065803,1218280294,1218494794,1218709304,1218923823,1219138351,1219352889,1219567436, + 1219781993,1219996559,1220211135,1220425720,1220640314,1220854918,1221069532,1221284154,1221498787,1221713428, + 1221928079,1222142740,1222357410,1222572089,1222786778,1223001476,1223216184,1223430901,1223645627,1223860363, + 1224075109,1224289863,1224504627,1224719401,1224934184,1225148976,1225363778,1225578589,1225793410,1226008240, + 1226223080,1226437928,1226652787,1226867654,1227082531,1227297418,1227512314,1227727219,1227942134,1228157058, + 1228371992,1228586934,1228801887,1229016849,1229231820,1229446800,1229661790,1229876789,1230091798,1230306816, + 1230521844,1230736881,1230951927,1231166983,1231382048,1231597122,1231812206,1232027299,1232242402,1232457514, + 1232672636,1232887766,1233102907,1233318056,1233533215,1233748383,1233963561,1234178748,1234393945,1234609151, + 1234824366,1235039590,1235254824,1235470068,1235685321,1235900583,1236115854,1236331135,1236546425,1236761725, + 1236977034,1237192352,1237407680,1237623017,1237838364,1238053719,1238269085,1238484459,1238699843,1238915236, + 1239130639,1239346051,1239561472,1239776903,1239992343,1240207793,1240423251,1240638720,1240854197,1241069684, + 1241285180,1241500686,1241716201,1241931725,1242147259,1242362802,1242578354,1242793916,1243009487,1243225067, + 1243440657,1243656256,1243871864,1244087482,1244303109,1244518745,1244734391,1244950046,1245165711,1245381385, + 1245597068,1245812760,1246028462,1246244173,1246459894,1246675623,1246891363,1247107111,1247322869,1247538636, + 1247754413,1247970198,1248185993,1248401798,1248617612,1248833435,1249049267,1249265109,1249480960,1249696820, + 1249912690,1250128569,1250344458,1250560355,1250776262,1250992179,1251208104,1251424039,1251639983,1251855937, + 1252071900,1252287872,1252503854,1252719845,1252935845,1253151854,1253367873,1253583901,1253799938,1254015985, + 1254232041,1254448106,1254664181,1254880265,1255096358,1255312461,1255528572,1255744693,1255960824,1256176964, + 1256393113,1256609271,1256825438,1257041615,1257257802,1257473997,1257690202,1257906416,1258122639,1258338872, + 1258555114,1258771365,1258987626,1259203895,1259420174,1259636463,1259852760,1260069067,1260285384,1260501709, + 1260718044,1260934388,1261150741,1261367104,1261583476,1261799857,1262016248,1262232647,1262449056,1262665475, + 1262881902,1263098339,1263314785,1263531241,1263747705,1263964179,1264180662,1264397155,1264613657,1264830168, + 1265046688,1265263217,1265479756,1265696304,1265912861,1266129428,1266346004,1266562589,1266779183,1266995787, + 1267212400,1267429022,1267645653,1267862294,1268078944,1268295603,1268512271,1268728949,1268945636,1269162332, + 1269379038,1269595752,1269812476,1270029209,1270245952,1270462703,1270679464,1270896234,1271113014,1271329802, + 1271546600,1271763407,1271980224,1272197049,1272413884,1272630728,1272847582,1273064444,1273281316,1273498197, + 1273715087,1273931987,1274148895,1274365813,1274582740,1274799677,1275016622,1275233577,1275450541,1275667515, + 1275884497,1276101489,1276318490,1276535500,1276752520,1276969548,1277186586,1277403633,1277620690,1277837755, + 1278054830,1278271914,1278489007,1278706110,1278923221,1279140342,1279357472,1279574611,1279791760,1280008918, + 1280226085,1280443261,1280660446,1280877641,1281094844,1281312057,1281529279,1281746511,1281963751,1282181001, + 1282398260,1282615528,1282832806,1283050092,1283267388,1283484693,1283702007,1283919331,1284136663,1284354005, + 1284571356,1284788716,1285006085,1285223464,1285440852,1285658249,1285875655,1286093070,1286310494,1286527928, + 1286745371,1286962823,1287180284,1287397755,1287615234,1287832723,1288050221,1288267728,1288485245,1288702770, + 1288920305,1289137849,1289355402,1289572964,1289790535,1290008116,1290225706,1290443305,1290660913,1290878530, + 1291096157,1291313792,1291531437,1291749091,1291966754,1292184426,1292402108,1292619799,1292837498,1293055207, + 1293272925,1293490653,1293708389,1293926135,1294143890,1294361654,1294579427,1294797209,1295015000,1295232801, + 1295450611,1295668430,1295886258,1296104095,1296321941,1296539797,1296757661,1296975535,1297193418,1297411310, + 1297629211,1297847122,1298065041,1298282970,1298500908,1298718855,1298936811,1299154776,1299372751,1299590734, + 1299808727,1300026729,1300244740,1300462760,1300680789,1300898828,1301116875,1301334932,1301552998,1301771072, + 1301989157,1302207250,1302425352,1302643464,1302861584,1303079714,1303297853,1303516001,1303734158,1303952324, + 1304170499,1304388684,1304606878,1304825080,1305043292,1305261513,1305479743,1305697982,1305916231,1306134488, + 1306352755,1306571030,1306789315,1307007609,1307225912,1307444224,1307662546,1307880876,1308099216,1308317564, + 1308535922,1308754289,1308972665,1309191050,1309409444,1309627847,1309846259,1310064681,1310283112,1310501551, + 1310720000,1310938458,1311156925,1311375401,1311593886,1311812380,1312030884,1312249396,1312467918,1312686449, + 1312904988,1313123537,1313342095,1313560662,1313779238,1313997824,1314216418,1314435021,1314653634,1314872255, + 1315090886,1315309526,1315528175,1315746833,1315965500,1316184176,1316402861,1316621555,1316840259,1317058971, + 1317277693,1317496423,1317715163,1317933912,1318152669,1318371436,1318590212,1318808997,1319027792,1319246595, + 1319465407,1319684228,1319903059,1320121898,1320340747,1320559605,1320778471,1320997347,1321216232,1321435126, + 1321654029,1321872941,1322091862,1322310792,1322529731,1322748679,1322967637,1323186603,1323405579,1323624563, + 1323843557,1324062559,1324281571,1324500592,1324719622,1324938661,1325157708,1325376765,1325595831,1325814906, + 1326033991,1326253084,1326472186,1326691297,1326910418,1327129547,1327348685,1327567833,1327786989,1328006155, + 1328225329,1328444513,1328663706,1328882907,1329102118,1329321338,1329540567,1329759804,1329979051,1330198307, + 1330417572,1330636846,1330856129,1331075421,1331294722,1331514033,1331733352,1331952680,1332172017,1332391363, + 1332610719,1332830083,1333049456,1333268839,1333488230,1333707630,1333927040,1334146458,1334365886,1334585322, + 1334804768,1335024222,1335243686,1335463158,1335682640,1335902131,1336121630,1336341139,1336560657,1336780183, + 1336999719,1337219264,1337438817,1337658380,1337877952,1338097532,1338317122,1338536721,1338756329,1338975945, + 1339195571,1339415206,1339634850,1339854503,1340074164,1340293835,1340513515,1340733204,1340952901,1341172608, + 1341392324,1341612049,1341831783,1342051525,1342271277,1342491038,1342710808,1342930586,1343150374,1343370171, + 1343589977,1343809791,1344029615,1344249448,1344469289,1344689140,1344909000,1345128868,1345348746,1345568633, + 1345788528,1346008433,1346228346,1346448269,1346668200,1346888141,1347108090,1347328049,1347548016,1347767993, + 1347987978,1348207972,1348427976,1348647988,1348868009,1349088040,1349308079,1349528127,1349748184,1349968250, + 1350188326,1350408410,1350628503,1350848605,1351068716,1351288836,1351508965,1351729102,1351949249,1352169405, + 1352389570,1352609744,1352829926,1353050118,1353270318,1353490528,1353710747,1353930974,1354151210,1354371456, + 1354591710,1354811973,1355032246,1355252527,1355472817,1355693116,1355913424, +}; + +static real aa_cs[8] = +{ + 14386344,14793176,15932125,16497281,16702017,16763133,16775525,16777101 +}; + +static real aa_ca[8] = +{ + -8631806,-7914349,-5257601,-3051997,-1586692,-687288,-238212,-62075 +}; + +static real win[4][36] = +{ + { + 541609,1798624,3379171,5462936,8388608,12881122,20824265,39123649,129925287,-141788570,-50986933,-32687548, + -24744405,-20251891,-17326219,-15242454,-13661907,-12404893,-11366990,-10483150,-9710514,-9019459,-8388608,-7801881, + -7246655,-6712557,-6190623,-5672661,-5150726,-4616628,-4061402,-3474675,-2843824,-2152769,-1380133,-496293 + }, + { + 541609,1798624,3379171,5462936,8388608,12881122,20824265,39123649,129925287,-141788570,-50986933,-32687548, + -24744405,-20251891,-17326219,-15242454,-13661907,-12404893,-11377819,-10573609,-9946281,-9457165,-9079764,-8795700, + -8518771,-7816938,-6661470,-5111526,-3237882,-1121518, + }, + { + 1798624,8388608,39123649,-50986933,-20251891,-13661907,-10483150,-8388608,-6712557,-5150726,-3474675,-1380133, + }, + { + 0,0,0,0,0,0,5058839,24594154,117073194,-152572757,-59375541,-38425694, + -27896396,-21920489,-18167045,-15612533,-13779795,-12416710,-11366990,-10483150,-9710514,-9019459,-8388608,-7801881, + -7246655,-6712557,-6190623,-5672661,-5150726,-4616628,-4061402,-3474675,-2843824,-2152769,-1380133,-496293 + } +}; + +const real COS9[9] = +{ + 16777216,16522332,15765426,14529495,12852093,10784187,8388608,5738146,2913333 +}; + +static const real COS6_1 = 14529495; + +static const real COS6_2 = 8388608; + +const real tfcos36[9] = +{ + 8420651,8684526,9255805,10240599,11863283,14625092,19849138,32411092,96248483 +}; + +static const real tfcos12[3] = +{ + 8684526,11863283,32411092 +}; + +#ifdef NEW_DCT9 +static const real cos9[3] = +{ + 15765426,-2913333,-12852093 +}; + +static const real cos18[3] = +{ + 16522332,-5738146,-10784187 +}; +#endif + +static const real tan1_1[16] = +{ + 0,6925,11994,16384,20774,25843,32768,44762,77530,2147483647,-44762,-11994,0,6925,11994,16384 +}; + +static const real tan2_1[16] = +{ + 32768,25843,20774,16384,11994,6925,0,-11994,-44762,2147483647,77530,44762,32768,25843,20774,16384 +}; + +static const real tan1_2[16] = +{ + 0,9793,16962,23170,29379,36548,46341,63303,109644,2147483647,-63303,-16962,0,9793,16962,23170 +}; + +static real tan2_2[16] = +{ + 46341,36548,29379,23170,16962,9793,0,-16962,-63303,2147483647,109644,63303,46341,36548,29379,23170 +}; + +static const real pow1_1[2][16] = +{ + {32768,27554,32768,23170,32768,19484,32768,16384,32768,13777,32768,11585,32768,9742,32768,8192}, + {32768,23170,32768,16384,32768,11585,32768,8192,32768,5793,32768,4096,32768,2896,32768,2048} +}; + +static const real pow2_1[2][16] = +{ + {32768,32768,27554,32768,23170,32768,19484,32768,16384,32768,13777,32768,11585,32768,9742,32768}, + {32768,32768,23170,32768,16384,32768,11585,32768,8192,32768,5793,32768,4096,32768,2896,32768} +}; + +static const real pow1_2[2][16] = +{ + {46341,38968,46341,32768,46341,27554,46341,23170,46341,19484,46341,16384,46341,13777,46341,11585}, + {46341,32768,46341,23170,46341,16384,46341,11585,46341,8192,46341,5793,46341,4096,46341,2896} +}; + +static const real pow2_2[2][16] = +{ + {46341,46341,38968,46341,32768,46341,27554,46341,23170,46341,19484,46341,16384,46341,13777,46341}, + {46341,46341,32768,46341,23170,46341,16384,46341,11585,46341,8192,46341,5793,46341,4096,46341} +}; + +static const real gainpow2[256+118+4] = +{ + 1518500250,1276901417,1073741824,1805811301,1518500250,1276901417,1073741824,1805811301,1518500250,1276901417, + 1073741824,1805811301,1518500250,1276901417,1073741824,1805811301,1518500250,1276901417,1073741824,1805811301, + 1518500250,1276901417,1073741824,1805811301,1518500250,1276901417,1073741824,1805811301,1518500250,1276901417, + 1073741824,1805811301,1518500250,1276901417,1073741824,1805811301,1518500250,1276901417,1073741824,1805811301, + 1518500250,1276901417,1073741824,1805811301,1518500250,1276901417,1073741824,1805811301,1518500250,1276901417, + 1073741824,1805811301,1518500250,1276901417,1073741824,1805811301,1518500250,1276901417,1073741824,1805811301, + 1518500250,1276901417,1073741824,902905651,759250125,638450708,536870912,451452825,379625062,319225354, + 268435456,225726413,189812531,159612677,134217728,112863206,94906266,79806339,67108864,56431603, + 47453133,39903169,33554432,28215802,23726566,19951585,16777216,14107901,11863283,9975792, + 8388608,7053950,5931642,4987896,4194304,3526975,2965821,2493948,2097152,1763488, + 1482910,1246974,1048576,881744,741455,623487,524288,440872,370728,311744, + 262144,220436,185364,155872,131072,110218,92682,77936,65536,55109, + 46341,38968,32768,27554,23170,19484,16384,13777,11585,9742, + 8192,6889,5793,4871,4096,3444,2896,2435,2048,1722, + 1448,1218,1024,861,724,609,512,431,362,304, + 256,215,181,152,128,108,91,76,64,54, + 45,38,32,27,23,19,16,13,11,10, + 8,7,6,5,4,3,3,2,2,2, + 1,1,1,1,1,1,1, +}; + +#else +static real ispow[8207]; +static real aa_ca[8],aa_cs[8]; +static real win[4][36]; +static real win1[4][36]; +real COS9[9]; /* dct36_3dnow wants to use that */ +static real COS6_1,COS6_2; +real tfcos36[9]; /* dct36_3dnow wants to use that */ +static real tfcos12[3]; +#ifdef NEW_DCT9 +static real cos9[3],cos18[3]; +static real tan1_1[16],tan2_1[16],tan1_2[16],tan2_2[16]; +static real pow1_1[2][16],pow2_1[2][16],pow1_2[2][16],pow2_2[2][16]; +#endif +#endif + +static real win1[4][36]; + +static const char gainpow2_scale[256+118+4+1] = +{ + 19,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23,24,24,24,24,25,25,25,25,26,26,26,26,27, + 27,27,27,28,28,28,28,29,29,29,29,30,30,30,30,31,31,31,31,32,32,32,32,33,33,33,33,34,34,34,34,34, + 34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34, + 34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34, + 34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34, + 34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34, + 34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34, + 34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34, + 34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34, + 34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34, + 34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34, + 34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,0 +}; + +#endif diff --git a/deps/mpg123/src/libmpg123/layer1.c b/deps/mpg123/src/libmpg123/layer1.c new file mode 100644 index 0000000..4b3b418 --- /dev/null +++ b/deps/mpg123/src/libmpg123/layer1.c @@ -0,0 +1,155 @@ +/* + layer1.c: the layer 1 decoder + + copyright 1995-2009 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Michael Hipp + + may have a few bugs after last optimization ... +*/ + +#include "mpg123lib_intern.h" +#include "getbits.h" + +static void I_step_one(unsigned int balloc[], unsigned int scale_index[2][SBLIMIT],mpg123_handle *fr) +{ + unsigned int *ba=balloc; + unsigned int *sca = (unsigned int *) scale_index; + + if(fr->stereo == 2) + { + int i; + int jsbound = fr->jsbound; + for(i=0;istereo == 2) + { + int jsbound = fr->jsbound; + register real *f0 = fraction[0]; + register real *f1 = fraction[1]; + ba = balloc; + for(sample=smpb,i=0;imuls[n+1][*sca++]); + else *f0++ = DOUBLE_TO_REAL(0.0); + + if((n=*ba++)) + *f1++ = REAL_MUL_SCALE_LAYER12(DOUBLE_TO_REAL_15( ((-1)<muls[n+1][*sca++]); + else *f1++ = DOUBLE_TO_REAL(0.0); + } + for(i=jsbound;imuls[n+1][*sca++]); + *f1++ = REAL_MUL_SCALE_LAYER12(samp, fr->muls[n+1][*sca++]); + } + else *f0++ = *f1++ = DOUBLE_TO_REAL(0.0); + } + for(i=fr->down_sample_sblimit;i<32;i++) + fraction[0][i] = fraction[1][i] = 0.0; + } + else + { + register real *f0 = fraction[0]; + ba = balloc; + for(sample=smpb,i=0;imuls[n+1][*sca++]); + else *f0++ = DOUBLE_TO_REAL(0.0); + } + for(i=fr->down_sample_sblimit;i<32;i++) + fraction[0][i] = DOUBLE_TO_REAL(0.0); + } +} + +int do_layer1(mpg123_handle *fr) +{ + int clip=0; + int i,stereo = fr->stereo; + unsigned int balloc[2*SBLIMIT]; + unsigned int scale_index[2][SBLIMIT]; + real (*fraction)[SBLIMIT] = fr->layer1.fraction; /* fraction[2][SBLIMIT] */ + int single = fr->single; + + fr->jsbound = (fr->mode == MPG_MD_JOINT_STEREO) ? (fr->mode_ext<<2)+4 : 32; + + if(stereo == 1 || single == SINGLE_MIX) /* I don't see mixing handled here */ + single = SINGLE_LEFT; + + I_step_one(balloc,scale_index,fr); + + for(i=0;isynth_mono)(fraction[single], fr); + else + clip += (fr->synth_stereo)(fraction[0], fraction[1], fr); + } + + return clip; +} + + diff --git a/deps/mpg123/src/libmpg123/layer2.c b/deps/mpg123/src/libmpg123/layer2.c new file mode 100644 index 0000000..056e8f4 --- /dev/null +++ b/deps/mpg123/src/libmpg123/layer2.c @@ -0,0 +1,371 @@ +/* + layer2.c: the layer 2 decoder, root of mpg123 + + copyright 1994-2009 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Michael Hipp + + mpg123 started as mp2 decoder a long time ago... + part of this file is required for layer 1, too. +*/ + + +#include "mpg123lib_intern.h" +#ifndef NO_LAYER2 +#include "l2tables.h" +#endif +#include "getbits.h" + +#ifndef NO_LAYER12 /* Stuff needed for layer I and II. */ + +static int grp_3tab[32 * 3] = { 0, }; /* used: 27 */ +static int grp_5tab[128 * 3] = { 0, }; /* used: 125 */ +static int grp_9tab[1024 * 3] = { 0, }; /* used: 729 */ + +#if defined(REAL_IS_FIXED) && defined(PRECALC_TABLES) +#include "l12_integer_tables.h" +#else +static const double mulmul[27] = +{ + 0.0 , -2.0/3.0 , 2.0/3.0 , + 2.0/7.0 , 2.0/15.0 , 2.0/31.0, 2.0/63.0 , 2.0/127.0 , 2.0/255.0 , + 2.0/511.0 , 2.0/1023.0 , 2.0/2047.0 , 2.0/4095.0 , 2.0/8191.0 , + 2.0/16383.0 , 2.0/32767.0 , 2.0/65535.0 , + -4.0/5.0 , -2.0/5.0 , 2.0/5.0, 4.0/5.0 , + -8.0/9.0 , -4.0/9.0 , -2.0/9.0 , 2.0/9.0 , 4.0/9.0 , 8.0/9.0 +}; +#endif + +void init_layer12(void) +{ + const int base[3][9] = + { + { 1 , 0, 2 , } , + { 17, 18, 0 , 19, 20 , } , + { 21, 1, 22, 23, 0, 24, 25, 2, 26 } + }; + int i,j,k,l,len; + const int tablen[3] = { 3 , 5 , 9 }; + int *itable; + int *tables[3] = { grp_3tab , grp_5tab , grp_9tab }; + + for(i=0;i<3;i++) + { + itable = tables[i]; + len = tablen[i]; + for(j=0;jmuls[k], k); + *table++ = 0.0; + } +} + +real* init_layer12_table(mpg123_handle *fr, real *table, int m) +{ +#if defined(REAL_IS_FIXED) && defined(PRECALC_TABLES) + int i; + for(i=0;i<63;i++) + *table++ = layer12_table[m][i]; +#else + int i,j; + for(j=3,i=0;i<63;i++,j--) + *table++ = DOUBLE_TO_REAL_SCALE_LAYER12(mulmul[m] * pow(2.0,(double) j / 3.0)); +#endif + + return table; +} + +#ifdef OPT_MMXORSSE +real* init_layer12_table_mmx(mpg123_handle *fr, real *table, int m) +{ + int i,j; + if(!fr->p.down_sample) + { + for(j=3,i=0;i<63;i++,j--) + *table++ = DOUBLE_TO_REAL(16384 * mulmul[m] * pow(2.0,(double) j / 3.0)); + } + else + { + for(j=3,i=0;i<63;i++,j--) + *table++ = DOUBLE_TO_REAL(mulmul[m] * pow(2.0,(double) j / 3.0)); + } + return table; +} +#endif + +#endif /* NO_LAYER12 */ + +/* The rest is the actual decoding of layer II data. */ + +#ifndef NO_LAYER2 + +static void II_step_one(unsigned int *bit_alloc,int *scale,mpg123_handle *fr) +{ + int stereo = fr->stereo-1; + int sblimit = fr->II_sblimit; + int jsbound = fr->jsbound; + int sblimit2 = fr->II_sblimit<alloc; + int i; + unsigned int scfsi_buf[64]; + unsigned int *scfsi,*bita; + int sc,step; + + bita = bit_alloc; + if(stereo) + { + for(i=jsbound;i;i--,alloc1+=(1<bits; + *bita++ = (char) getbits(fr, step); + *bita++ = (char) getbits(fr, step); + } + for(i=sblimit-jsbound;i;i--,alloc1+=(1<bits; + bita[0] = (char) getbits(fr, step); + bita[1] = bita[0]; + bita+=2; + } + bita = bit_alloc; + scfsi=scfsi_buf; + + for(i=sblimit2;i;i--) + if(*bita++) *scfsi++ = (char) getbits_fast(fr, 2); + } + else /* mono */ + { + for(i=sblimit;i;i--,alloc1+=(1<bits; + *bita++ = (char) getbits(fr, step); + } + bita = bit_alloc; + scfsi=scfsi_buf; + for(i=sblimit;i;i--) + if(*bita++) *scfsi++ = (char) getbits_fast(fr, 2); + } + + bita = bit_alloc; + scfsi=scfsi_buf; + for(i=sblimit2;i;i--) + if(*bita++) + switch(*scfsi++) + { + case 0: + *scale++ = getbits_fast(fr, 6); + *scale++ = getbits_fast(fr, 6); + *scale++ = getbits_fast(fr, 6); + break; + case 1 : + *scale++ = sc = getbits_fast(fr, 6); + *scale++ = sc; + *scale++ = getbits_fast(fr, 6); + break; + case 2: + *scale++ = sc = getbits_fast(fr, 6); + *scale++ = sc; + *scale++ = sc; + break; + default: /* case 3 */ + *scale++ = getbits_fast(fr, 6); + *scale++ = sc = getbits_fast(fr, 6); + *scale++ = sc; + break; + } +} + + +static void II_step_two(unsigned int *bit_alloc,real fraction[2][4][SBLIMIT],int *scale,mpg123_handle *fr,int x1) +{ + int i,j,k,ba; + int stereo = fr->stereo; + int sblimit = fr->II_sblimit; + int jsbound = fr->jsbound; + const struct al_table *alloc2,*alloc1 = fr->alloc; + unsigned int *bita=bit_alloc; + int d1,step; + + for(i=0;ibits; + for(j=0;jbits; + if( (d1=alloc2->d) < 0) + { + real cm=fr->muls[k][scale[x1]]; + fraction[j][0][i] = REAL_MUL_SCALE_LAYER12(DOUBLE_TO_REAL_15((int)getbits(fr, k) + d1), cm); + fraction[j][1][i] = REAL_MUL_SCALE_LAYER12(DOUBLE_TO_REAL_15((int)getbits(fr, k) + d1), cm); + fraction[j][2][i] = REAL_MUL_SCALE_LAYER12(DOUBLE_TO_REAL_15((int)getbits(fr, k) + d1), cm); + } + else + { + const int *table[] = { 0,0,0,grp_3tab,0,grp_5tab,0,0,0,grp_9tab }; + unsigned int idx,*tab,m=scale[x1]; + idx = (unsigned int) getbits(fr, k); + tab = (unsigned int *) (table[d1] + idx + idx + idx); + fraction[j][0][i] = REAL_SCALE_LAYER12(fr->muls[*tab++][m]); + fraction[j][1][i] = REAL_SCALE_LAYER12(fr->muls[*tab++][m]); + fraction[j][2][i] = REAL_SCALE_LAYER12(fr->muls[*tab][m]); + } + scale+=3; + } + else + fraction[j][0][i] = fraction[j][1][i] = fraction[j][2][i] = DOUBLE_TO_REAL(0.0); + } + } + + for(i=jsbound;ibits; + bita++; /* channel 1 and channel 2 bitalloc are the same */ + if( (ba=*bita++) ) + { + k=(alloc2 = alloc1+ba)->bits; + if( (d1=alloc2->d) < 0) + { + real cm; + cm=fr->muls[k][scale[x1+3]]; + fraction[0][0][i] = DOUBLE_TO_REAL_15((int)getbits(fr, k) + d1); + fraction[0][1][i] = DOUBLE_TO_REAL_15((int)getbits(fr, k) + d1); + fraction[0][2][i] = DOUBLE_TO_REAL_15((int)getbits(fr, k) + d1); + fraction[1][0][i] = REAL_MUL_SCALE_LAYER12(fraction[0][0][i], cm); + fraction[1][1][i] = REAL_MUL_SCALE_LAYER12(fraction[0][1][i], cm); + fraction[1][2][i] = REAL_MUL_SCALE_LAYER12(fraction[0][2][i], cm); + cm=fr->muls[k][scale[x1]]; + fraction[0][0][i] = REAL_MUL_SCALE_LAYER12(fraction[0][0][i], cm); + fraction[0][1][i] = REAL_MUL_SCALE_LAYER12(fraction[0][1][i], cm); + fraction[0][2][i] = REAL_MUL_SCALE_LAYER12(fraction[0][2][i], cm); + } + else + { + const int *table[] = { 0,0,0,grp_3tab,0,grp_5tab,0,0,0,grp_9tab }; + unsigned int idx,*tab,m1,m2; + m1 = scale[x1]; m2 = scale[x1+3]; + idx = (unsigned int) getbits(fr, k); + tab = (unsigned int *) (table[d1] + idx + idx + idx); + fraction[0][0][i] = REAL_SCALE_LAYER12(fr->muls[*tab][m1]); fraction[1][0][i] = REAL_SCALE_LAYER12(fr->muls[*tab++][m2]); + fraction[0][1][i] = REAL_SCALE_LAYER12(fr->muls[*tab][m1]); fraction[1][1][i] = REAL_SCALE_LAYER12(fr->muls[*tab++][m2]); + fraction[0][2][i] = REAL_SCALE_LAYER12(fr->muls[*tab][m1]); fraction[1][2][i] = REAL_SCALE_LAYER12(fr->muls[*tab][m2]); + } + scale+=6; + } + else + { + fraction[0][0][i] = fraction[0][1][i] = fraction[0][2][i] = + fraction[1][0][i] = fraction[1][1][i] = fraction[1][2][i] = DOUBLE_TO_REAL(0.0); + } +/* + Historic comment... + should we use individual scalefac for channel 2 or + is the current way the right one , where we just copy channel 1 to + channel 2 ?? + The current 'strange' thing is, that we throw away the scalefac + values for the second channel ...!! + -> changed .. now we use the scalefac values of channel one !! +*/ + } + + if(sblimit > (fr->down_sample_sblimit) ) + sblimit = fr->down_sample_sblimit; + + for(i=sblimit;isampling_frequency >= 3) /* Or equivalent: (fr->lsf == 1) */ + table = 4; + else + table = translate[fr->sampling_frequency][2-fr->stereo][fr->bitrate_index]; + + sblim = sblims[table]; + fr->alloc = tables[table]; + fr->II_sblimit = sblim; +} + + +int do_layer2(mpg123_handle *fr) +{ + int clip=0; + int i,j; + int stereo = fr->stereo; + /* pick_table clears unused subbands */ + /* replacement for real fraction[2][4][SBLIMIT], needs alignment. */ + real (*fraction)[4][SBLIMIT] = fr->layer2.fraction; + unsigned int bit_alloc[64]; + int scale[192]; + int single = fr->single; + + II_select_table(fr); + fr->jsbound = (fr->mode == MPG_MD_JOINT_STEREO) ? (fr->mode_ext<<2)+4 : fr->II_sblimit; + + if(fr->jsbound > fr->II_sblimit) + { + fprintf(stderr, "Truncating stereo boundary to sideband limit.\n"); + fr->jsbound=fr->II_sblimit; + } + + /* TODO: What happens with mono mixing, actually? */ + if(stereo == 1 || single == SINGLE_MIX) /* also, mix not really handled */ + single = SINGLE_LEFT; + + II_step_one(bit_alloc, scale, fr); + + for(i=0;i>2); + for(j=0;j<3;j++) + { + if(single != SINGLE_STEREO) + clip += (fr->synth_mono)(fraction[single][j], fr); + else + clip += (fr->synth_stereo)(fraction[0][j], fraction[1][j], fr); + } + } + + return clip; +} + +#endif /* NO_LAYER2 */ diff --git a/deps/mpg123/src/libmpg123/layer3.c b/deps/mpg123/src/libmpg123/layer3.c new file mode 100644 index 0000000..e43a5de --- /dev/null +++ b/deps/mpg123/src/libmpg123/layer3.c @@ -0,0 +1,2053 @@ +/* + layer3.c: the layer 3 decoder + + copyright 1995-2009 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Michael Hipp + + Dear visitor: + If you feel you don't understand fully the works of this file, your feeling might be correct. + + Optimize-TODO: put short bands into the band-field without the stride of 3 reals + Length-optimze: unify long and short band code where it is possible + + The int-vs-pointer situation has to be cleaned up. +*/ + +#include "mpg123lib_intern.h" +#include "huffman.h" +#include "getbits.h" +#include "debug.h" + +/* define CUT_SFB21 if you want to cut-off the frequency above 16kHz */ +#if 0 +#define CUT_SFB21 +#endif + +#ifdef REAL_IS_FIXED +#define NEW_DCT9 +#include "l3_integer_tables.h" +#else +/* static one-time calculated tables... or so */ +static real ispow[8207]; +static real aa_ca[8],aa_cs[8]; +static real win[4][36]; +static real win1[4][36]; +real COS9[9]; /* dct36_3dnow wants to use that */ +static real COS6_1,COS6_2; +real tfcos36[9]; /* dct36_3dnow wants to use that */ +static real tfcos12[3]; +#define NEW_DCT9 +#ifdef NEW_DCT9 +static real cos9[3],cos18[3]; +static real tan1_1[16],tan2_1[16],tan1_2[16],tan2_2[16]; +static real pow1_1[2][16],pow2_1[2][16],pow1_2[2][16],pow2_2[2][16]; +#endif +#endif + +/* Decoder state data, living on the stack of do_layer3. */ + +struct gr_info_s +{ + int scfsi; + unsigned part2_3_length; + unsigned big_values; + unsigned scalefac_compress; + unsigned block_type; + unsigned mixed_block_flag; + unsigned table_select[3]; + /* Making those two signed int as workaround for open64/pathscale/sun compilers, and also for consistency, since they're worked on together with other signed variables. */ + int maxband[3]; + int maxbandl; + unsigned maxb; + unsigned region1start; + unsigned region2start; + unsigned preflag; + unsigned scalefac_scale; + unsigned count1table_select; + real *full_gain[3]; + real *pow2gain; +}; + +struct III_sideinfo +{ + unsigned main_data_begin; + unsigned private_bits; + /* Hm, funny... struct inside struct... */ + struct { struct gr_info_s gr[2]; } ch[2]; +}; + +struct bandInfoStruct +{ + unsigned short longIdx[23]; + unsigned char longDiff[22]; + unsigned short shortIdx[14]; + unsigned char shortDiff[13]; +}; + +/* Techy details about our friendly MPEG data. Fairly constant over the years;-) */ +static const struct bandInfoStruct bandInfo[9] = +{ + { /* MPEG 1.0 */ + {0,4,8,12,16,20,24,30,36,44,52,62,74, 90,110,134,162,196,238,288,342,418,576}, + {4,4,4,4,4,4,6,6,8, 8,10,12,16,20,24,28,34,42,50,54, 76,158}, + {0,4*3,8*3,12*3,16*3,22*3,30*3,40*3,52*3,66*3, 84*3,106*3,136*3,192*3}, + {4,4,4,4,6,8,10,12,14,18,22,30,56} + }, + { + {0,4,8,12,16,20,24,30,36,42,50,60,72, 88,106,128,156,190,230,276,330,384,576}, + {4,4,4,4,4,4,6,6,6, 8,10,12,16,18,22,28,34,40,46,54, 54,192}, + {0,4*3,8*3,12*3,16*3,22*3,28*3,38*3,50*3,64*3, 80*3,100*3,126*3,192*3}, + {4,4,4,4,6,6,10,12,14,16,20,26,66} + }, + { + {0,4,8,12,16,20,24,30,36,44,54,66,82,102,126,156,194,240,296,364,448,550,576}, + {4,4,4,4,4,4,6,6,8,10,12,16,20,24,30,38,46,56,68,84,102, 26}, + {0,4*3,8*3,12*3,16*3,22*3,30*3,42*3,58*3,78*3,104*3,138*3,180*3,192*3}, + {4,4,4,4,6,8,12,16,20,26,34,42,12} + }, + { /* MPEG 2.0 */ + {0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576}, + {6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54 } , + {0,4*3,8*3,12*3,18*3,24*3,32*3,42*3,56*3,74*3,100*3,132*3,174*3,192*3} , + {4,4,4,6,6,8,10,14,18,26,32,42,18 } + }, + { /* Twiddling 3 values here (not just 330->332!) fixed bug 1895025. */ + {0,6,12,18,24,30,36,44,54,66,80,96,114,136,162,194,232,278,332,394,464,540,576}, + {6,6,6,6,6,6,8,10,12,14,16,18,22,26,32,38,46,54,62,70,76,36 }, + {0,4*3,8*3,12*3,18*3,26*3,36*3,48*3,62*3,80*3,104*3,136*3,180*3,192*3}, + {4,4,4,6,8,10,12,14,18,24,32,44,12 } + }, + { + {0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576}, + {6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54 }, + {0,4*3,8*3,12*3,18*3,26*3,36*3,48*3,62*3,80*3,104*3,134*3,174*3,192*3}, + {4,4,4,6,8,10,12,14,18,24,30,40,18 } + }, + { /* MPEG 2.5 */ + {0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576}, + {6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54}, + {0,12,24,36,54,78,108,144,186,240,312,402,522,576}, + {4,4,4,6,8,10,12,14,18,24,30,40,18} + }, + { + {0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576}, + {6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54}, + {0,12,24,36,54,78,108,144,186,240,312,402,522,576}, + {4,4,4,6,8,10,12,14,18,24,30,40,18} + }, + { + {0,12,24,36,48,60,72,88,108,132,160,192,232,280,336,400,476,566,568,570,572,574,576}, + {12,12,12,12,12,12,16,20,24,28,32,40,48,56,64,76,90,2,2,2,2,2}, + {0, 24, 48, 72,108,156,216,288,372,480,486,492,498,576}, + {8,8,8,12,16,20,24,28,36,2,2,2,26} + } +}; + +static int mapbuf0[9][152]; +static int mapbuf1[9][156]; +static int mapbuf2[9][44]; +static int *map[9][3]; +static int *mapend[9][3]; + +static unsigned int n_slen2[512]; /* MPEG 2.0 slen for 'normal' mode */ +static unsigned int i_slen2[256]; /* MPEG 2.0 slen for intensity stereo */ + +/* Some helpers used in init_layer3 */ + +#ifdef OPT_MMXORSSE +real init_layer3_gainpow2_mmx(mpg123_handle *fr, int i) +{ + if(!fr->p.down_sample) return DOUBLE_TO_REAL(16384.0 * pow((double)2.0,-0.25 * (double) (i+210) )); + else return DOUBLE_TO_REAL(pow((double)2.0,-0.25 * (double) (i+210))); +} +#endif + +real init_layer3_gainpow2(mpg123_handle *fr, int i) +{ +#if defined(REAL_IS_FIXED) && defined(PRECALC_TABLES) + return gainpow2[i+256]; +#else + return DOUBLE_TO_REAL_SCALE_LAYER3(pow((double)2.0,-0.25 * (double) (i+210)),i+256); +#endif +} + + +/* init tables for layer-3 ... specific with the downsampling... */ +void init_layer3(void) +{ + int i,j,k,l; + +#if !defined(REAL_IS_FIXED) || !defined(PRECALC_TABLES) + for(i=0;i<8207;i++) + ispow[i] = DOUBLE_TO_REAL_POW43(pow((double)i,(double)4.0/3.0)); + + for(i=0;i<8;i++) + { + const double Ci[8] = {-0.6,-0.535,-0.33,-0.185,-0.095,-0.041,-0.0142,-0.0037}; + double sq = sqrt(1.0+Ci[i]*Ci[i]); + aa_cs[i] = DOUBLE_TO_REAL(1.0/sq); + aa_ca[i] = DOUBLE_TO_REAL(Ci[i]/sq); + } + + for(i=0;i<18;i++) + { + win[0][i] = win[1][i] = + DOUBLE_TO_REAL( 0.5*sin(M_PI/72.0 * (double)(2*(i+0) +1)) / cos(M_PI * (double)(2*(i+0) +19) / 72.0) ); + win[0][i+18] = win[3][i+18] = + DOUBLE_TO_REAL( 0.5*sin(M_PI/72.0 * (double)(2*(i+18)+1)) / cos(M_PI * (double)(2*(i+18)+19) / 72.0) ); + } + for(i=0;i<6;i++) + { + win[1][i+18] = DOUBLE_TO_REAL(0.5 / cos ( M_PI * (double) (2*(i+18)+19) / 72.0 )); + win[3][i+12] = DOUBLE_TO_REAL(0.5 / cos ( M_PI * (double) (2*(i+12)+19) / 72.0 )); + win[1][i+24] = DOUBLE_TO_REAL(0.5 * sin( M_PI / 24.0 * (double) (2*i+13) ) / cos ( M_PI * (double) (2*(i+24)+19) / 72.0 )); + win[1][i+30] = win[3][i] = DOUBLE_TO_REAL(0.0); + win[3][i+6 ] = DOUBLE_TO_REAL(0.5 * sin( M_PI / 24.0 * (double) (2*i+1 ) ) / cos ( M_PI * (double) (2*(i+6 )+19) / 72.0 )); + } + + for(i=0;i<9;i++) + COS9[i] = DOUBLE_TO_REAL(cos( M_PI / 18.0 * (double) i)); + + for(i=0;i<9;i++) + tfcos36[i] = DOUBLE_TO_REAL(0.5 / cos ( M_PI * (double) (i*2+1) / 36.0 )); + + for(i=0;i<3;i++) + tfcos12[i] = DOUBLE_TO_REAL(0.5 / cos ( M_PI * (double) (i*2+1) / 12.0 )); + + COS6_1 = DOUBLE_TO_REAL(cos( M_PI / 6.0 * (double) 1)); + COS6_2 = DOUBLE_TO_REAL(cos( M_PI / 6.0 * (double) 2)); + +#ifdef NEW_DCT9 + cos9[0] = DOUBLE_TO_REAL(cos(1.0*M_PI/9.0)); + cos9[1] = DOUBLE_TO_REAL(cos(5.0*M_PI/9.0)); + cos9[2] = DOUBLE_TO_REAL(cos(7.0*M_PI/9.0)); + cos18[0] = DOUBLE_TO_REAL(cos(1.0*M_PI/18.0)); + cos18[1] = DOUBLE_TO_REAL(cos(11.0*M_PI/18.0)); + cos18[2] = DOUBLE_TO_REAL(cos(13.0*M_PI/18.0)); +#endif + + for(i=0;i<12;i++) + { + win[2][i] = DOUBLE_TO_REAL(0.5 * sin( M_PI / 24.0 * (double) (2*i+1) ) / cos ( M_PI * (double) (2*i+7) / 24.0 )); + } + + for(i=0;i<16;i++) + { + double t = tan( (double) i * M_PI / 12.0 ); + tan1_1[i] = DOUBLE_TO_REAL_15(t / (1.0+t)); + tan2_1[i] = DOUBLE_TO_REAL_15(1.0 / (1.0 + t)); + tan1_2[i] = DOUBLE_TO_REAL_15(M_SQRT2 * t / (1.0+t)); + tan2_2[i] = DOUBLE_TO_REAL_15(M_SQRT2 / (1.0 + t)); + + for(j=0;j<2;j++) + { + double base = pow(2.0,-0.25*(j+1.0)); + double p1=1.0,p2=1.0; + if(i > 0) + { + if( i & 1 ) p1 = pow(base,(i+1.0)*0.5); + else p2 = pow(base,i*0.5); + } + pow1_1[j][i] = DOUBLE_TO_REAL_15(p1); + pow2_1[j][i] = DOUBLE_TO_REAL_15(p2); + pow1_2[j][i] = DOUBLE_TO_REAL_15(M_SQRT2 * p1); + pow2_2[j][i] = DOUBLE_TO_REAL_15(M_SQRT2 * p2); + } + } +#endif + + for(j=0;j<4;j++) + { + const int len[4] = { 36,36,12,36 }; + for(i=0;ilongDiff; + for(i=0,cb = 0; cb < 8 ; cb++,i+=*bdf++) + { + *mp++ = (*bdf) >> 1; + *mp++ = i; + *mp++ = 3; + *mp++ = cb; + } + bdf = bi->shortDiff+3; + for(cb=3;cb<13;cb++) + { + int l = (*bdf++) >> 1; + for(lwin=0;lwin<3;lwin++) + { + *mp++ = l; + *mp++ = i + lwin; + *mp++ = lwin; + *mp++ = cb; + } + i += 6*l; + } + mapend[j][0] = mp; + + mp = map[j][1] = mapbuf1[j]; + bdf = bi->shortDiff+0; + for(i=0,cb=0;cb<13;cb++) + { + int l = (*bdf++) >> 1; + for(lwin=0;lwin<3;lwin++) + { + *mp++ = l; + *mp++ = i + lwin; + *mp++ = lwin; + *mp++ = cb; + } + i += 6*l; + } + mapend[j][1] = mp; + + mp = map[j][2] = mapbuf2[j]; + bdf = bi->longDiff; + for(cb = 0; cb < 22 ; cb++) + { + *mp++ = (*bdf++) >> 1; + *mp++ = cb; + } + mapend[j][2] = mp; + } + + /* Now for some serious loopings! */ + for(i=0;i<5;i++) + for(j=0;j<6;j++) + for(k=0;k<6;k++) + { + int n = k + j * 6 + i * 36; + i_slen2[n] = i|(j<<3)|(k<<6)|(3<<12); + } + for(i=0;i<4;i++) + for(j=0;j<4;j++) + for(k=0;k<4;k++) + { + int n = k + j * 4 + i * 16; + i_slen2[n+180] = i|(j<<3)|(k<<6)|(4<<12); + } + for(i=0;i<4;i++) + for(j=0;j<3;j++) + { + int n = j + i * 3; + i_slen2[n+244] = i|(j<<3) | (5<<12); + n_slen2[n+500] = i|(j<<3) | (2<<12) | (1<<15); + } + for(i=0;i<5;i++) + for(j=0;j<5;j++) + for(k=0;k<4;k++) + for(l=0;l<4;l++) + { + int n = l + k * 4 + j * 16 + i * 80; + n_slen2[n] = i|(j<<3)|(k<<6)|(l<<9)|(0<<12); + } + for(i=0;i<5;i++) + for(j=0;j<5;j++) + for(k=0;k<4;k++) + { + int n = k + j * 4 + i * 20; + n_slen2[n+400] = i|(j<<3)|(k<<6)|(1<<12); + } +} + + +void init_layer3_stuff(mpg123_handle *fr, real (*gainpow2)(mpg123_handle *fr, int i)) +{ + int i,j; + + for(i=-256;i<118+4;i++) fr->gainpow2[i+256] = gainpow2(fr,i); + + for(j=0;j<9;j++) + { + for(i=0;i<23;i++) + { + fr->longLimit[j][i] = (bandInfo[j].longIdx[i] - 1 + 8) / 18 + 1; + if(fr->longLimit[j][i] > (fr->down_sample_sblimit) ) + fr->longLimit[j][i] = fr->down_sample_sblimit; + } + for(i=0;i<14;i++) + { + fr->shortLimit[j][i] = (bandInfo[j].shortIdx[i] - 1) / 18 + 1; + if(fr->shortLimit[j][i] > (fr->down_sample_sblimit) ) + fr->shortLimit[j][i] = fr->down_sample_sblimit; + } + } +} + +/* + Observe! + Now come the actualy decoding routines. +*/ + +/* read additional side information (for MPEG 1 and MPEG 2) */ +static int III_get_side_info(mpg123_handle *fr, struct III_sideinfo *si,int stereo, int ms_stereo,long sfreq,int single) +{ + int ch, gr; + int powdiff = (single == SINGLE_MIX) ? 4 : 0; + + const int tabs[2][5] = { { 2,9,5,3,4 } , { 1,8,1,2,9 } }; + const int *tab = tabs[fr->lsf]; + + si->main_data_begin = getbits(fr, tab[1]); + + if(si->main_data_begin > fr->bitreservoir) + { + if(!fr->to_ignore && VERBOSE2) fprintf(stderr, "Note: missing %d bytes in bit reservoir for frame %li\n", (int)(si->main_data_begin - fr->bitreservoir), (long)fr->num); + + /* overwrite main_data_begin for the really available bit reservoir */ + backbits(fr, tab[1]); + if(fr->lsf == 0) + { + fr->wordpointer[0] = (unsigned char) (fr->bitreservoir >> 1); + fr->wordpointer[1] = (unsigned char) ((fr->bitreservoir & 1) << 7); + } + else fr->wordpointer[0] = (unsigned char) fr->bitreservoir; + + /* zero "side-info" data for a silence-frame + without touching audio data used as bit reservoir for following frame */ + memset(fr->wordpointer+2, 0, fr->ssize-2); + + /* reread the new bit reservoir offset */ + si->main_data_begin = getbits(fr, tab[1]); + } + + /* Keep track of the available data bytes for the bit reservoir. + Think: Substract the 2 crc bytes in parser already? */ + fr->bitreservoir = fr->bitreservoir + fr->framesize - fr->ssize - (fr->error_protection ? 2 : 0); + /* Limit the reservoir to the max for MPEG 1.0 or 2.x . */ + if(fr->bitreservoir > (unsigned int) (fr->lsf == 0 ? 511 : 255)) + fr->bitreservoir = (fr->lsf == 0 ? 511 : 255); + + /* Now back into less commented territory. It's code. It works. */ + + if (stereo == 1) + si->private_bits = getbits_fast(fr, tab[2]); + else + si->private_bits = getbits_fast(fr, tab[3]); + + if(!fr->lsf) for(ch=0; chch[ch].gr[0].scfsi = -1; + si->ch[ch].gr[1].scfsi = getbits_fast(fr, 4); + } + + for (gr=0; grch[ch].gr[gr]); + + gr_info->part2_3_length = getbits(fr, 12); + gr_info->big_values = getbits(fr, 9); + if(gr_info->big_values > 288) + { + if(NOQUIET) error("big_values too large!"); + gr_info->big_values = 288; + } + gr_info->pow2gain = fr->gainpow2+256 - getbits_fast(fr, 8) + powdiff; + if(ms_stereo) gr_info->pow2gain += 2; + + gr_info->scalefac_compress = getbits(fr, tab[4]); + + if(get1bit(fr)) + { /* window switch flag */ + int i; + gr_info->block_type = getbits_fast(fr, 2); + gr_info->mixed_block_flag = get1bit(fr); + gr_info->table_select[0] = getbits_fast(fr, 5); + gr_info->table_select[1] = getbits_fast(fr, 5); + /* + table_select[2] not needed, because there is no region2, + but to satisfy some verification tools we set it either. + */ + gr_info->table_select[2] = 0; + for(i=0;i<3;i++) + gr_info->full_gain[i] = gr_info->pow2gain + (getbits_fast(fr, 3)<<3); + + if(gr_info->block_type == 0) + { + if(NOQUIET) error("Blocktype == 0 and window-switching == 1 not allowed."); + return 1; + } + + /* region_count/start parameters are implicit in this case. */ + if( (!fr->lsf || (gr_info->block_type == 2)) && !fr->mpeg25) + { + gr_info->region1start = 36>>1; + gr_info->region2start = 576>>1; + } + else + { + if(fr->mpeg25) + { + int r0c,r1c; + if((gr_info->block_type == 2) && (!gr_info->mixed_block_flag) ) r0c = 5; + else r0c = 7; + + /* r0c+1+r1c+1 == 22, always. */ + r1c = 20 - r0c; + gr_info->region1start = bandInfo[sfreq].longIdx[r0c+1] >> 1 ; + gr_info->region2start = bandInfo[sfreq].longIdx[r0c+1+r1c+1] >> 1; + } + else + { + gr_info->region1start = 54>>1; + gr_info->region2start = 576>>1; + } + } + } + else + { + int i,r0c,r1c; + for (i=0; i<3; i++) + gr_info->table_select[i] = getbits_fast(fr, 5); + + r0c = getbits_fast(fr, 4); /* 0 .. 15 */ + r1c = getbits_fast(fr, 3); /* 0 .. 7 */ + gr_info->region1start = bandInfo[sfreq].longIdx[r0c+1] >> 1 ; + + /* max(r0c+r1c+2) = 15+7+2 = 24 */ + if(r0c+1+r1c+1 > 22) gr_info->region2start = 576>>1; + else gr_info->region2start = bandInfo[sfreq].longIdx[r0c+1+r1c+1] >> 1; + + gr_info->block_type = 0; + gr_info->mixed_block_flag = 0; + } + if(!fr->lsf) gr_info->preflag = get1bit(fr); + + gr_info->scalefac_scale = get1bit(fr); + gr_info->count1table_select = get1bit(fr); + } + return 0; +} + + +/* read scalefactors */ +static int III_get_scale_factors_1(mpg123_handle *fr, int *scf,struct gr_info_s *gr_info,int ch,int gr) +{ + const unsigned char slen[2][16] = + { + {0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4}, + {0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3} + }; + int numbits; + int num0 = slen[0][gr_info->scalefac_compress]; + int num1 = slen[1][gr_info->scalefac_compress]; + + if(gr_info->block_type == 2) + { + int i=18; + numbits = (num0 + num1) * 18; + + if(gr_info->mixed_block_flag) + { + for (i=8;i;i--) + *scf++ = getbits_fast(fr, num0); + + i = 9; + numbits -= num0; /* num0 * 17 + num1 * 18 */ + } + + for(;i;i--) *scf++ = getbits_fast(fr, num0); + + for(i = 18; i; i--) *scf++ = getbits_fast(fr, num1); + + *scf++ = 0; *scf++ = 0; *scf++ = 0; /* short[13][0..2] = 0 */ + } + else + { + int i; + int scfsi = gr_info->scfsi; + + if(scfsi < 0) + { /* scfsi < 0 => granule == 0 */ + for(i=11;i;i--) *scf++ = getbits_fast(fr, num0); + + for(i=10;i;i--) *scf++ = getbits_fast(fr, num1); + + numbits = (num0 + num1) * 10 + num0; + *scf++ = 0; + } + else + { + numbits = 0; + if(!(scfsi & 0x8)) + { + for (i=0;i<6;i++) *scf++ = getbits_fast(fr, num0); + + numbits += num0 * 6; + } + else scf += 6; + + if(!(scfsi & 0x4)) + { + for (i=0;i<5;i++) *scf++ = getbits_fast(fr, num0); + + numbits += num0 * 5; + } + else scf += 5; + + if(!(scfsi & 0x2)) + { + for(i=0;i<5;i++) *scf++ = getbits_fast(fr, num1); + + numbits += num1 * 5; + } + else scf += 5; + + if(!(scfsi & 0x1)) + { + for (i=0;i<5;i++) *scf++ = getbits_fast(fr, num1); + + numbits += num1 * 5; + } + else scf += 5; + + *scf++ = 0; /* no l[21] in original sources */ + } + } + return numbits; +} + + +static int III_get_scale_factors_2(mpg123_handle *fr, int *scf,struct gr_info_s *gr_info,int i_stereo) +{ + const unsigned char *pnt; + int i,j,n=0,numbits=0; + unsigned int slen; + + const unsigned char stab[3][6][4] = + { + { + { 6, 5, 5,5 } , { 6, 5, 7,3 } , { 11,10,0,0}, + { 7, 7, 7,0 } , { 6, 6, 6,3 } , { 8, 8,5,0} + }, + { + { 9, 9, 9,9 } , { 9, 9,12,6 } , { 18,18,0,0}, + {12,12,12,0 } , {12, 9, 9,6 } , { 15,12,9,0} + }, + { + { 6, 9, 9,9 } , { 6, 9,12,6 } , { 15,18,0,0}, + { 6,15,12,0 } , { 6,12, 9,6 } , { 6,18,9,0} + } + }; + + if(i_stereo) /* i_stereo AND second channel -> do_layer3() checks this */ + slen = i_slen2[gr_info->scalefac_compress>>1]; + else + slen = n_slen2[gr_info->scalefac_compress]; + + gr_info->preflag = (slen>>15) & 0x1; + + n = 0; + if( gr_info->block_type == 2 ) + { + n++; + if(gr_info->mixed_block_flag) n++; + } + + pnt = stab[n][(slen>>12)&0x7]; + + for(i=0;i<4;i++) + { + int num = slen & 0x7; + slen >>= 3; + if(num) + { + for(j=0;j<(int)(pnt[i]);j++) *scf++ = getbits_fast(fr, num); + + numbits += pnt[i] * num; + } + else + for(j=0;j<(int)(pnt[i]);j++) *scf++ = 0; + } + + n = (n << 1) + 1; + for(i=0;iscalefac_scale; + real *xrpnt = (real *) xr; + int l[3],l3; + int part2remain = gr_info->part2_3_length - part2bits; + int *me; +#ifdef REAL_IS_FIXED + int gainpow2_scale_idx = 378; +#endif + + /* mhipp tree has this split up a bit... */ + int num=getbitoffset(fr); + long mask; + /* We must split this, because for num==0 the shift is undefined if you do it in one step. */ + mask = ((unsigned long) getbits(fr, num))<big_values; + int region1 = gr_info->region1start; + int region2 = gr_info->region2start; + l3 = ((576>>1)-bv)>>1; + + /* we may lose the 'odd' bit here !! check this later again */ + if(bv <= region1) + { + l[0] = bv; + l[1] = 0; + l[2] = 0; + } + else + { + l[0] = region1; + if(bv <= region2) + { + l[1] = bv - l[0]; + l[2] = 0; + } + else + { + l[1] = region2 - l[0]; + l[2] = bv - region2; + } + } + } + + if(gr_info->block_type == 2) + { + /* decoding with short or mixed mode BandIndex table */ + int i,max[4]; + int step=0,lwin=3,cb=0; + register real v = 0.0; + register int *m,mc; + + if(gr_info->mixed_block_flag) + { + max[3] = -1; + max[0] = max[1] = max[2] = 2; + m = map[sfreq][0]; + me = mapend[sfreq][0]; + } + else + { + max[0] = max[1] = max[2] = max[3] = -1; + /* max[3] not really needed in this case */ + m = map[sfreq][1]; + me = mapend[sfreq][1]; + } + + mc = 0; + for(i=0;i<2;i++) + { + int lp = l[i]; + const struct newhuff *h = ht+gr_info->table_select[i]; + for(;lp;lp--,mc--) + { + register int x,y; + if( (!mc) ) + { + mc = *m++; + xrpnt = ((real *) xr) + (*m++); + lwin = *m++; + cb = *m++; + if(lwin == 3) + { +#ifdef REAL_IS_FIXED + gainpow2_scale_idx = (int)(gr_info->pow2gain + (*scf << shift) - fr->gainpow2); +#endif + v = gr_info->pow2gain[(*scf++) << shift]; + step = 1; + } + else + { +#ifdef REAL_IS_FIXED + gainpow2_scale_idx = (int)(gr_info->full_gain[lwin] + (*scf << shift) - fr->gainpow2); +#endif + v = gr_info->full_gain[lwin][(*scf++) << shift]; + step = 3; + } + } + { + const short *val = h->table; + REFRESH_MASK; + while((y=*val++)<0) + { + if (mask < 0) val -= y; + + num--; + mask <<= 1; + } + x = y >> 4; + y &= 0xf; + } + if(x == 15 && h->linbits) + { + max[lwin] = cb; + REFRESH_MASK; + x += ((unsigned long) mask) >> (BITSHIFT+8-h->linbits); + num -= h->linbits+1; + mask <<= h->linbits; + if(mask < 0) *xrpnt = REAL_MUL_SCALE_LAYER3(-ispow[x], v, gainpow2_scale_idx); + else *xrpnt = REAL_MUL_SCALE_LAYER3( ispow[x], v, gainpow2_scale_idx); + + mask <<= 1; + } + else if(x) + { + max[lwin] = cb; + if(mask < 0) *xrpnt = REAL_MUL_SCALE_LAYER3(-ispow[x], v, gainpow2_scale_idx); + else *xrpnt = REAL_MUL_SCALE_LAYER3( ispow[x], v, gainpow2_scale_idx); + + num--; + mask <<= 1; + } + else *xrpnt = DOUBLE_TO_REAL(0.0); + + xrpnt += step; + if(y == 15 && h->linbits) + { + max[lwin] = cb; + REFRESH_MASK; + y += ((unsigned long) mask) >> (BITSHIFT+8-h->linbits); + num -= h->linbits+1; + mask <<= h->linbits; + if(mask < 0) *xrpnt = REAL_MUL_SCALE_LAYER3(-ispow[y], v, gainpow2_scale_idx); + else *xrpnt = REAL_MUL_SCALE_LAYER3( ispow[y], v, gainpow2_scale_idx); + + mask <<= 1; + } + else if(y) + { + max[lwin] = cb; + if(mask < 0) *xrpnt = REAL_MUL_SCALE_LAYER3(-ispow[y], v, gainpow2_scale_idx); + else *xrpnt = REAL_MUL_SCALE_LAYER3( ispow[y], v, gainpow2_scale_idx); + + num--; + mask <<= 1; + } + else *xrpnt = DOUBLE_TO_REAL(0.0); + + xrpnt += step; + } + } + + for(;l3 && (part2remain+num > 0);l3--) + { + const struct newhuff* h; + const short* val; + register short a; + /* + This is only a humble hack to prevent a special segfault. + More insight into the real workings is still needed. + Especially why there are (valid?) files that make xrpnt exceed the array with 4 bytes without segfaulting, more seems to be really bad, though. + */ + #ifdef DEBUG + if(!(xrpnt < &xr[SBLIMIT][0])) + { + if(VERBOSE) debug2("attempted soft xrpnt overflow (%p !< %p) ?", (void*) xrpnt, (void*) &xr[SBLIMIT][0]); + } + #endif + if(!(xrpnt < &xr[SBLIMIT][0]+5)) + { + if(NOQUIET) error2("attempted xrpnt overflow (%p !< %p)", (void*) xrpnt, (void*) &xr[SBLIMIT][0]); + return 2; + } + h = htc+gr_info->count1table_select; + val = h->table; + + REFRESH_MASK; + while((a=*val++)<0) + { + if(mask < 0) val -= a; + + num--; + mask <<= 1; + } + if(part2remain+num <= 0) + { + num -= part2remain+num; + break; + } + + for(i=0;i<4;i++) + { + if(!(i & 1)) + { + if(!mc) + { + mc = *m++; + xrpnt = ((real *) xr) + (*m++); + lwin = *m++; + cb = *m++; + if(lwin == 3) + { +#ifdef REAL_IS_FIXED + gainpow2_scale_idx = (int)(gr_info->pow2gain + (*scf << shift) - fr->gainpow2); +#endif + v = gr_info->pow2gain[(*scf++) << shift]; + step = 1; + } + else + { +#ifdef REAL_IS_FIXED + gainpow2_scale_idx = (int)(gr_info->full_gain[lwin] + (*scf << shift) - fr->gainpow2); +#endif + v = gr_info->full_gain[lwin][(*scf++) << shift]; + step = 3; + } + } + mc--; + } + if( (a & (0x8>>i)) ) + { + max[lwin] = cb; + if(part2remain+num <= 0) + break; + + if(mask < 0) *xrpnt = -REAL_SCALE_LAYER3(v, gainpow2_scale_idx); + else *xrpnt = REAL_SCALE_LAYER3(v, gainpow2_scale_idx); + + num--; + mask <<= 1; + } + else *xrpnt = DOUBLE_TO_REAL(0.0); + + xrpnt += step; + } + } + + if(lwin < 3) + { /* short band? */ + while(1) + { + for(;mc > 0;mc--) + { + *xrpnt = DOUBLE_TO_REAL(0.0); xrpnt += 3; /* short band -> step=3 */ + *xrpnt = DOUBLE_TO_REAL(0.0); xrpnt += 3; + } + if(m >= me) + break; + + mc = *m++; + xrpnt = ((real *) xr) + *m++; + if(*m++ == 0) + break; /* optimize: field will be set to zero at the end of the function */ + + m++; /* cb */ + } + } + + gr_info->maxband[0] = max[0]+1; + gr_info->maxband[1] = max[1]+1; + gr_info->maxband[2] = max[2]+1; + gr_info->maxbandl = max[3]+1; + + { + int rmax = max[0] > max[1] ? max[0] : max[1]; + rmax = (rmax > max[2] ? rmax : max[2]) + 1; + gr_info->maxb = rmax ? fr->shortLimit[sfreq][rmax] : fr->longLimit[sfreq][max[3]+1]; + } + + } + else + { + /* decoding with 'long' BandIndex table (block_type != 2) */ + const unsigned char *pretab = pretab_choice[gr_info->preflag]; + int i,max = -1; + int cb = 0; + int *m = map[sfreq][2]; + register real v = 0.0; + int mc = 0; + + /* long hash table values */ + for(i=0;i<3;i++) + { + int lp = l[i]; + const struct newhuff *h = ht+gr_info->table_select[i]; + + for(;lp;lp--,mc--) + { + int x,y; + if(!mc) + { + mc = *m++; + cb = *m++; +#ifdef CUT_SFB21 + if(cb == 21) + v = 0.0; + else +#endif + { +#ifdef REAL_IS_FIXED + gainpow2_scale_idx = (int)(gr_info->pow2gain + (*scf << shift) - fr->gainpow2); +#endif + v = gr_info->pow2gain[(*(scf++) + (*pretab++)) << shift]; + } + } + { + const short *val = h->table; + REFRESH_MASK; + while((y=*val++)<0) + { + if (mask < 0) val -= y; + + num--; + mask <<= 1; + } + x = y >> 4; + y &= 0xf; + } + + if(x == 15 && h->linbits) + { + max = cb; + REFRESH_MASK; + x += ((unsigned long) mask) >> (BITSHIFT+8-h->linbits); + num -= h->linbits+1; + mask <<= h->linbits; + if(mask < 0) *xrpnt++ = REAL_MUL_SCALE_LAYER3(-ispow[x], v, gainpow2_scale_idx); + else *xrpnt++ = REAL_MUL_SCALE_LAYER3( ispow[x], v, gainpow2_scale_idx); + + mask <<= 1; + } + else if(x) + { + max = cb; + if(mask < 0) *xrpnt++ = REAL_MUL_SCALE_LAYER3(-ispow[x], v, gainpow2_scale_idx); + else *xrpnt++ = REAL_MUL_SCALE_LAYER3( ispow[x], v, gainpow2_scale_idx); + num--; + + mask <<= 1; + } + else *xrpnt++ = DOUBLE_TO_REAL(0.0); + + if(y == 15 && h->linbits) + { + max = cb; + REFRESH_MASK; + y += ((unsigned long) mask) >> (BITSHIFT+8-h->linbits); + num -= h->linbits+1; + mask <<= h->linbits; + if(mask < 0) *xrpnt++ = REAL_MUL_SCALE_LAYER3(-ispow[y], v, gainpow2_scale_idx); + else *xrpnt++ = REAL_MUL_SCALE_LAYER3( ispow[y], v, gainpow2_scale_idx); + + mask <<= 1; + } + else if(y) + { + max = cb; + if(mask < 0) *xrpnt++ = REAL_MUL_SCALE_LAYER3(-ispow[y], v, gainpow2_scale_idx); + else *xrpnt++ = REAL_MUL_SCALE_LAYER3( ispow[y], v, gainpow2_scale_idx); + + num--; + mask <<= 1; + } + else *xrpnt++ = DOUBLE_TO_REAL(0.0); + } + } + + /* short (count1table) values */ + for(;l3 && (part2remain+num > 0);l3--) + { + const struct newhuff *h = htc+gr_info->count1table_select; + const short *val = h->table; + register short a; + + REFRESH_MASK; + while((a=*val++)<0) + { + if (mask < 0) val -= a; + + num--; + mask <<= 1; + } + if(part2remain+num <= 0) + { + num -= part2remain+num; + break; + } + + for(i=0;i<4;i++) + { + if(!(i & 1)) + { + if(!mc) + { + mc = *m++; + cb = *m++; +#ifdef CUT_SFB21 + if(cb == 21) + v = 0.0; + else +#endif + { +#ifdef REAL_IS_FIXED + gainpow2_scale_idx = (int)(gr_info->pow2gain + (*scf << shift) - fr->gainpow2); +#endif + v = gr_info->pow2gain[((*scf++) + (*pretab++)) << shift]; + } + } + mc--; + } + if( (a & (0x8>>i)) ) + { + max = cb; + if(part2remain+num <= 0) + break; + + if(mask < 0) *xrpnt++ = -REAL_SCALE_LAYER3(v, gainpow2_scale_idx); + else *xrpnt++ = REAL_SCALE_LAYER3(v, gainpow2_scale_idx); + + num--; + mask <<= 1; + } + else *xrpnt++ = DOUBLE_TO_REAL(0.0); + } + } + + gr_info->maxbandl = max+1; + gr_info->maxb = fr->longLimit[sfreq][gr_info->maxbandl]; + } + + part2remain += num; + backbits(fr, num); + num = 0; + + while(xrpnt < &xr[SBLIMIT][0]) + *xrpnt++ = DOUBLE_TO_REAL(0.0); + + while( part2remain > 16 ) + { + skipbits(fr, 16); /* Dismiss stuffing Bits */ + part2remain -= 16; + } + if(part2remain > 0) skipbits(fr, part2remain); + else if(part2remain < 0) + { + debug1("Can't rewind stream by %d bits!",-part2remain); + return 1; /* -> error */ + } + return 0; +} + + +/* calculate real channel values for Joint-I-Stereo-mode */ +static void III_i_stereo(real xr_buf[2][SBLIMIT][SSLIMIT],int *scalefac, struct gr_info_s *gr_info,int sfreq,int ms_stereo,int lsf) +{ + real (*xr)[SBLIMIT*SSLIMIT] = (real (*)[SBLIMIT*SSLIMIT] ) xr_buf; + const struct bandInfoStruct *bi = &bandInfo[sfreq]; + + const real *tab1,*tab2; + +#if 1 + int tab; +/* TODO: optimize as static */ + const real *tabs[3][2][2] = + { + { { tan1_1,tan2_1 } , { tan1_2,tan2_2 } }, + { { pow1_1[0],pow2_1[0] } , { pow1_2[0],pow2_2[0] } }, + { { pow1_1[1],pow2_1[1] } , { pow1_2[1],pow2_2[1] } } + }; + + tab = lsf + (gr_info->scalefac_compress & lsf); + tab1 = tabs[tab][ms_stereo][0]; + tab2 = tabs[tab][ms_stereo][1]; +#else + if(lsf) + { + int p = gr_info->scalefac_compress & 0x1; + if(ms_stereo) + { + tab1 = pow1_2[p]; + tab2 = pow2_2[p]; + } + else + { + tab1 = pow1_1[p]; + tab2 = pow2_1[p]; + } + } + else + { + if(ms_stereo) + { + tab1 = tan1_2; + tab2 = tan2_2; + } + else + { + tab1 = tan1_1; + tab2 = tan2_1; + } + } +#endif + + if(gr_info->block_type == 2) + { + int lwin,do_l = 0; + if( gr_info->mixed_block_flag ) do_l = 1; + + for(lwin=0;lwin<3;lwin++) + { /* process each window */ + /* get first band with zero values */ + int is_p,sb,idx,sfb = gr_info->maxband[lwin]; /* sfb is minimal 3 for mixed mode */ + if(sfb > 3) do_l = 0; + + for(;sfb<12;sfb++) + { + is_p = scalefac[sfb*3+lwin-gr_info->mixed_block_flag]; /* scale: 0-15 */ + if(is_p != 7) + { + real t1,t2; + sb = bi->shortDiff[sfb]; + idx = bi->shortIdx[sfb] + lwin; + t1 = tab1[is_p]; t2 = tab2[is_p]; + for (; sb > 0; sb--,idx+=3) + { + real v = xr[0][idx]; + xr[0][idx] = REAL_MUL_15(v, t1); + xr[1][idx] = REAL_MUL_15(v, t2); + } + } + } + +#if 1 +/* in the original: copy 10 to 11 , here: copy 11 to 12 +maybe still wrong??? (copy 12 to 13?) */ + is_p = scalefac[11*3+lwin-gr_info->mixed_block_flag]; /* scale: 0-15 */ + sb = bi->shortDiff[12]; + idx = bi->shortIdx[12] + lwin; +#else + is_p = scalefac[10*3+lwin-gr_info->mixed_block_flag]; /* scale: 0-15 */ + sb = bi->shortDiff[11]; + idx = bi->shortIdx[11] + lwin; +#endif + if(is_p != 7) + { + real t1,t2; + t1 = tab1[is_p]; t2 = tab2[is_p]; + for( ; sb > 0; sb--,idx+=3 ) + { + real v = xr[0][idx]; + xr[0][idx] = REAL_MUL_15(v, t1); + xr[1][idx] = REAL_MUL_15(v, t2); + } + } + } /* end for(lwin; .. ; . ) */ + + /* also check l-part, if ALL bands in the three windows are 'empty' and mode = mixed_mode */ + if(do_l) + { + int sfb = gr_info->maxbandl; + int idx; + if(sfb > 21) return; /* similarity fix related to CVE-2006-1655 */ + + idx = bi->longIdx[sfb]; + for( ; sfb<8; sfb++ ) + { + int sb = bi->longDiff[sfb]; + int is_p = scalefac[sfb]; /* scale: 0-15 */ + if(is_p != 7) + { + real t1,t2; + t1 = tab1[is_p]; t2 = tab2[is_p]; + for( ; sb > 0; sb--,idx++) + { + real v = xr[0][idx]; + xr[0][idx] = REAL_MUL_15(v, t1); + xr[1][idx] = REAL_MUL_15(v, t2); + } + } + else idx += sb; + } + } + } + else + { /* ((gr_info->block_type != 2)) */ + int sfb = gr_info->maxbandl; + int is_p,idx; + if(sfb > 21) return; /* tightened fix for CVE-2006-1655 */ + + idx = bi->longIdx[sfb]; + for ( ; sfb<21; sfb++) + { + int sb = bi->longDiff[sfb]; + is_p = scalefac[sfb]; /* scale: 0-15 */ + if(is_p != 7) + { + real t1,t2; + t1 = tab1[is_p]; t2 = tab2[is_p]; + for( ; sb > 0; sb--,idx++) + { + real v = xr[0][idx]; + xr[0][idx] = REAL_MUL_15(v, t1); + xr[1][idx] = REAL_MUL_15(v, t2); + } + } + else idx += sb; + } + + is_p = scalefac[20]; + if(is_p != 7) + { /* copy l-band 20 to l-band 21 */ + int sb; + real t1 = tab1[is_p],t2 = tab2[is_p]; + + for( sb = bi->longDiff[21]; sb > 0; sb--,idx++ ) + { + real v = xr[0][idx]; + xr[0][idx] = REAL_MUL_15(v, t1); + xr[1][idx] = REAL_MUL_15(v, t2); + } + } + } +} + + +static void III_antialias(real xr[SBLIMIT][SSLIMIT],struct gr_info_s *gr_info) +{ + int sblim; + + if(gr_info->block_type == 2) + { + if(!gr_info->mixed_block_flag) return; + + sblim = 1; + } + else sblim = gr_info->maxb-1; + + /* 31 alias-reduction operations between each pair of sub-bands */ + /* with 8 butterflies between each pair */ + + { + int sb; + real *xr1=(real *) xr[1]; + + for(sb=sblim; sb; sb--,xr1+=10) + { + int ss; + real *cs=aa_cs,*ca=aa_ca; + real *xr2 = xr1; + + for(ss=7;ss>=0;ss--) + { /* upper and lower butterfly inputs */ + register real bu = *--xr2,bd = *xr1; + *xr2 = REAL_MUL(bu, *cs) - REAL_MUL(bd, *ca); + *xr1++ = REAL_MUL(bd, *cs++) + REAL_MUL(bu, *ca++); + } + } + } +} + +/* + This is an optimized DCT from Jeff Tsay's maplay 1.2+ package. + Saved one multiplication by doing the 'twiddle factor' stuff + together with the window mul. (MH) + + This uses Byeong Gi Lee's Fast Cosine Transform algorithm, but the + 9 point IDCT needs to be reduced further. Unfortunately, I don't + know how to do that, because 9 is not an even number. - Jeff. + + Original Message: + + 9 Point Inverse Discrete Cosine Transform + + This piece of code is Copyright 1997 Mikko Tommila and is freely usable + by anybody. The algorithm itself is of course in the public domain. + + Again derived heuristically from the 9-point WFTA. + + The algorithm is optimized (?) for speed, not for small rounding errors or + good readability. + + 36 additions, 11 multiplications + + Again this is very likely sub-optimal. + + The code is optimized to use a minimum number of temporary variables, + so it should compile quite well even on 8-register Intel x86 processors. + This makes the code quite obfuscated and very difficult to understand. + + References: + [1] S. Winograd: "On Computing the Discrete Fourier Transform", + Mathematics of Computation, Volume 32, Number 141, January 1978, + Pages 175-199 +*/ + +/* Calculation of the inverse MDCT + used to be static without 3dnow - does that really matter? */ +void dct36(real *inbuf,real *o1,real *o2,real *wintab,real *tsbuf) +{ +#ifdef NEW_DCT9 + real tmp[18]; +#endif + + { + register real *in = inbuf; + + in[17]+=in[16]; in[16]+=in[15]; in[15]+=in[14]; + in[14]+=in[13]; in[13]+=in[12]; in[12]+=in[11]; + in[11]+=in[10]; in[10]+=in[9]; in[9] +=in[8]; + in[8] +=in[7]; in[7] +=in[6]; in[6] +=in[5]; + in[5] +=in[4]; in[4] +=in[3]; in[3] +=in[2]; + in[2] +=in[1]; in[1] +=in[0]; + + in[17]+=in[15]; in[15]+=in[13]; in[13]+=in[11]; in[11]+=in[9]; + in[9] +=in[7]; in[7] +=in[5]; in[5] +=in[3]; in[3] +=in[1]; + + +#ifdef NEW_DCT9 +#if 1 + { + real t3; + { + real t0, t1, t2; + + t0 = REAL_MUL(COS6_2, (in[8] + in[16] - in[4])); + t1 = REAL_MUL(COS6_2, in[12]); + + t3 = in[0]; + t2 = t3 - t1 - t1; + tmp[1] = tmp[7] = t2 - t0; + tmp[4] = t2 + t0 + t0; + t3 += t1; + + t2 = REAL_MUL(COS6_1, (in[10] + in[14] - in[2])); + tmp[1] -= t2; + tmp[7] += t2; + } + { + real t0, t1, t2; + + t0 = REAL_MUL(cos9[0], (in[4] + in[8] )); + t1 = REAL_MUL(cos9[1], (in[8] - in[16])); + t2 = REAL_MUL(cos9[2], (in[4] + in[16])); + + tmp[2] = tmp[6] = t3 - t0 - t2; + tmp[0] = tmp[8] = t3 + t0 + t1; + tmp[3] = tmp[5] = t3 - t1 + t2; + } + } + { + real t1, t2, t3; + + t1 = REAL_MUL(cos18[0], (in[2] + in[10])); + t2 = REAL_MUL(cos18[1], (in[10] - in[14])); + t3 = REAL_MUL(COS6_1, in[6]); + + { + real t0 = t1 + t2 + t3; + tmp[0] += t0; + tmp[8] -= t0; + } + + t2 -= t3; + t1 -= t3; + + t3 = REAL_MUL(cos18[2], (in[2] + in[14])); + + t1 += t3; + tmp[3] += t1; + tmp[5] -= t1; + + t2 -= t3; + tmp[2] += t2; + tmp[6] -= t2; + } + +#else + { + real t0, t1, t2, t3, t4, t5, t6, t7; + + t1 = REAL_MUL(COS6_2, in[12]); + t2 = REAL_MUL(COS6_2, (in[8] + in[16] - in[4])); + + t3 = in[0] + t1; + t4 = in[0] - t1 - t1; + t5 = t4 - t2; + tmp[4] = t4 + t2 + t2; + + t0 = REAL_MUL(cos9[0], (in[4] + in[8])); + t1 = REAL_MUL(cos9[1], (in[8] - in[16])); + + t2 = REAL_MUL(cos9[2], (in[4] + in[16])); + + t6 = t3 - t0 - t2; + t0 += t3 + t1; + t3 += t2 - t1; + + t2 = REAL_MUL(cos18[0], (in[2] + in[10])); + t4 = REAL_MUL(cos18[1], (in[10] - in[14])); + t7 = REAL_MUL(COS6_1, in[6]); + + t1 = t2 + t4 + t7; + tmp[0] = t0 + t1; + tmp[8] = t0 - t1; + t1 = REAL_MUL(cos18[2], (in[2] + in[14])); + t2 += t1 - t7; + + tmp[3] = t3 + t2; + t0 = REAL_MUL(COS6_1, (in[10] + in[14] - in[2])); + tmp[5] = t3 - t2; + + t4 -= t1 + t7; + + tmp[1] = t5 - t0; + tmp[7] = t5 + t0; + tmp[2] = t6 + t4; + tmp[6] = t6 - t4; + } +#endif + + { + real t0, t1, t2, t3, t4, t5, t6, t7; + + t1 = REAL_MUL(COS6_2, in[13]); + t2 = REAL_MUL(COS6_2, (in[9] + in[17] - in[5])); + + t3 = in[1] + t1; + t4 = in[1] - t1 - t1; + t5 = t4 - t2; + + t0 = REAL_MUL(cos9[0], (in[5] + in[9])); + t1 = REAL_MUL(cos9[1], (in[9] - in[17])); + + tmp[13] = REAL_MUL((t4 + t2 + t2), tfcos36[17-13]); + t2 = REAL_MUL(cos9[2], (in[5] + in[17])); + + t6 = t3 - t0 - t2; + t0 += t3 + t1; + t3 += t2 - t1; + + t2 = REAL_MUL(cos18[0], (in[3] + in[11])); + t4 = REAL_MUL(cos18[1], (in[11] - in[15])); + t7 = REAL_MUL(COS6_1, in[7]); + + t1 = t2 + t4 + t7; + tmp[17] = REAL_MUL((t0 + t1), tfcos36[17-17]); + tmp[9] = REAL_MUL((t0 - t1), tfcos36[17-9]); + t1 = REAL_MUL(cos18[2], (in[3] + in[15])); + t2 += t1 - t7; + + tmp[14] = REAL_MUL((t3 + t2), tfcos36[17-14]); + t0 = REAL_MUL(COS6_1, (in[11] + in[15] - in[3])); + tmp[12] = REAL_MUL((t3 - t2), tfcos36[17-12]); + + t4 -= t1 + t7; + + tmp[16] = REAL_MUL((t5 - t0), tfcos36[17-16]); + tmp[10] = REAL_MUL((t5 + t0), tfcos36[17-10]); + tmp[15] = REAL_MUL((t6 + t4), tfcos36[17-15]); + tmp[11] = REAL_MUL((t6 - t4), tfcos36[17-11]); + } + +#define MACRO(v) { \ + real tmpval; \ + tmpval = tmp[(v)] + tmp[17-(v)]; \ + out2[9+(v)] = REAL_MUL(tmpval, w[27+(v)]); \ + out2[8-(v)] = REAL_MUL(tmpval, w[26-(v)]); \ + tmpval = tmp[(v)] - tmp[17-(v)]; \ + ts[SBLIMIT*(8-(v))] = out1[8-(v)] + REAL_MUL(tmpval, w[8-(v)]); \ + ts[SBLIMIT*(9+(v))] = out1[9+(v)] + REAL_MUL(tmpval, w[9+(v)]); } + + { + register real *out2 = o2; + register real *w = wintab; + register real *out1 = o1; + register real *ts = tsbuf; + + MACRO(0); + MACRO(1); + MACRO(2); + MACRO(3); + MACRO(4); + MACRO(5); + MACRO(6); + MACRO(7); + MACRO(8); + } + +#else + + { + +#define MACRO0(v) { \ + real tmp; \ + out2[9+(v)] = REAL_MUL((tmp = sum0 + sum1), w[27+(v)]); \ + out2[8-(v)] = REAL_MUL(tmp, w[26-(v)]); } \ + sum0 -= sum1; \ + ts[SBLIMIT*(8-(v))] = out1[8-(v)] + REAL_MUL(sum0, w[8-(v)]); \ + ts[SBLIMIT*(9+(v))] = out1[9+(v)] + REAL_MUL(sum0, w[9+(v)]); +#define MACRO1(v) { \ + real sum0,sum1; \ + sum0 = tmp1a + tmp2a; \ + sum1 = REAL_MUL((tmp1b + tmp2b), tfcos36[(v)]); \ + MACRO0(v); } +#define MACRO2(v) { \ + real sum0,sum1; \ + sum0 = tmp2a - tmp1a; \ + sum1 = REAL_MUL((tmp2b - tmp1b), tfcos36[(v)]); \ + MACRO0(v); } + + register const real *c = COS9; + register real *out2 = o2; + register real *w = wintab; + register real *out1 = o1; + register real *ts = tsbuf; + + real ta33,ta66,tb33,tb66; + + ta33 = REAL_MUL(in[2*3+0], c[3]); + ta66 = REAL_MUL(in[2*6+0], c[6]); + tb33 = REAL_MUL(in[2*3+1], c[3]); + tb66 = REAL_MUL(in[2*6+1], c[6]); + + { + real tmp1a,tmp2a,tmp1b,tmp2b; + tmp1a = REAL_MUL(in[2*1+0], c[1]) + ta33 + REAL_MUL(in[2*5+0], c[5]) + REAL_MUL(in[2*7+0], c[7]); + tmp1b = REAL_MUL(in[2*1+1], c[1]) + tb33 + REAL_MUL(in[2*5+1], c[5]) + REAL_MUL(in[2*7+1], c[7]); + tmp2a = REAL_MUL(in[2*2+0], c[2]) + REAL_MUL(in[2*4+0], c[4]) + ta66 + REAL_MUL(in[2*8+0], c[8]); + tmp2b = REAL_MUL(in[2*2+1], c[2]) + REAL_MUL(in[2*4+1], c[4]) + tb66 + REAL_MUL(in[2*8+1], c[8]); + + MACRO1(0); + MACRO2(8); + } + + { + real tmp1a,tmp2a,tmp1b,tmp2b; + tmp1a = REAL_MUL(( in[2*1+0] - in[2*5+0] - in[2*7+0] ), c[3]); + tmp1b = REAL_MUL(( in[2*1+1] - in[2*5+1] - in[2*7+1] ), c[3]); + tmp2a = REAL_MUL(( in[2*2+0] - in[2*4+0] - in[2*8+0] ), c[6]) - in[2*6+0] + in[2*0+0]; + tmp2b = REAL_MUL(( in[2*2+1] - in[2*4+1] - in[2*8+1] ), c[6]) - in[2*6+1] + in[2*0+1]; + + MACRO1(1); + MACRO2(7); + } + + { + real tmp1a,tmp2a,tmp1b,tmp2b; + tmp1a = REAL_MUL(in[2*1+0], c[5]) - ta33 - REAL_MUL(in[2*5+0], c[7]) + REAL_MUL(in[2*7+0], c[1]); + tmp1b = REAL_MUL(in[2*1+1], c[5]) - tb33 - REAL_MUL(in[2*5+1], c[7]) + REAL_MUL(in[2*7+1], c[1]); + tmp2a = - REAL_MUL(in[2*2+0], c[8]) - REAL_MUL(in[2*4+0], c[2]) + ta66 + REAL_MUL(in[2*8+0], c[4]); + tmp2b = - REAL_MUL(in[2*2+1], c[8]) - REAL_MUL(in[2*4+1], c[2]) + tb66 + REAL_MUL(in[2*8+1], c[4]); + + MACRO1(2); + MACRO2(6); + } + + { + real tmp1a,tmp2a,tmp1b,tmp2b; + tmp1a = REAL_MUL(in[2*1+0], c[7]) - ta33 + REAL_MUL(in[2*5+0], c[1]) - REAL_MUL(in[2*7+0], c[5]); + tmp1b = REAL_MUL(in[2*1+1], c[7]) - tb33 + REAL_MUL(in[2*5+1], c[1]) - REAL_MUL(in[2*7+1], c[5]); + tmp2a = - REAL_MUL(in[2*2+0], c[4]) + REAL_MUL(in[2*4+0], c[8]) + ta66 - REAL_MUL(in[2*8+0], c[2]); + tmp2b = - REAL_MUL(in[2*2+1], c[4]) + REAL_MUL(in[2*4+1], c[8]) + tb66 - REAL_MUL(in[2*8+1], c[2]); + + MACRO1(3); + MACRO2(5); + } + + { + real sum0,sum1; + sum0 = in[2*0+0] - in[2*2+0] + in[2*4+0] - in[2*6+0] + in[2*8+0]; + sum1 = REAL_MUL((in[2*0+1] - in[2*2+1] + in[2*4+1] - in[2*6+1] + in[2*8+1] ), tfcos36[4]); + MACRO0(4); + } + } +#endif + + } +} + + +/* new DCT12 */ +static void dct12(real *in,real *rawout1,real *rawout2,register real *wi,register real *ts) +{ +#define DCT12_PART1 \ + in5 = in[5*3]; \ + in5 += (in4 = in[4*3]); \ + in4 += (in3 = in[3*3]); \ + in3 += (in2 = in[2*3]); \ + in2 += (in1 = in[1*3]); \ + in1 += (in0 = in[0*3]); \ + \ + in5 += in3; in3 += in1; \ + \ + in2 = REAL_MUL(in2, COS6_1); \ + in3 = REAL_MUL(in3, COS6_1); + +#define DCT12_PART2 \ + in0 += REAL_MUL(in4, COS6_2); \ + \ + in4 = in0 + in2; \ + in0 -= in2; \ + \ + in1 += REAL_MUL(in5, COS6_2); \ + \ + in5 = REAL_MUL((in1 + in3), tfcos12[0]); \ + in1 = REAL_MUL((in1 - in3), tfcos12[2]); \ + \ + in3 = in4 + in5; \ + in4 -= in5; \ + \ + in2 = in0 + in1; \ + in0 -= in1; + + { + real in0,in1,in2,in3,in4,in5; + register real *out1 = rawout1; + ts[SBLIMIT*0] = out1[0]; ts[SBLIMIT*1] = out1[1]; ts[SBLIMIT*2] = out1[2]; + ts[SBLIMIT*3] = out1[3]; ts[SBLIMIT*4] = out1[4]; ts[SBLIMIT*5] = out1[5]; + + DCT12_PART1 + + { + real tmp0,tmp1 = (in0 - in4); + { + real tmp2 = REAL_MUL((in1 - in5), tfcos12[1]); + tmp0 = tmp1 + tmp2; + tmp1 -= tmp2; + } + ts[(17-1)*SBLIMIT] = out1[17-1] + REAL_MUL(tmp0, wi[11-1]); + ts[(12+1)*SBLIMIT] = out1[12+1] + REAL_MUL(tmp0, wi[6+1]); + ts[(6 +1)*SBLIMIT] = out1[6 +1] + REAL_MUL(tmp1, wi[1]); + ts[(11-1)*SBLIMIT] = out1[11-1] + REAL_MUL(tmp1, wi[5-1]); + } + + DCT12_PART2 + + ts[(17-0)*SBLIMIT] = out1[17-0] + REAL_MUL(in2, wi[11-0]); + ts[(12+0)*SBLIMIT] = out1[12+0] + REAL_MUL(in2, wi[6+0]); + ts[(12+2)*SBLIMIT] = out1[12+2] + REAL_MUL(in3, wi[6+2]); + ts[(17-2)*SBLIMIT] = out1[17-2] + REAL_MUL(in3, wi[11-2]); + + ts[(6 +0)*SBLIMIT] = out1[6+0] + REAL_MUL(in0, wi[0]); + ts[(11-0)*SBLIMIT] = out1[11-0] + REAL_MUL(in0, wi[5-0]); + ts[(6 +2)*SBLIMIT] = out1[6+2] + REAL_MUL(in4, wi[2]); + ts[(11-2)*SBLIMIT] = out1[11-2] + REAL_MUL(in4, wi[5-2]); + } + + in++; + + { + real in0,in1,in2,in3,in4,in5; + register real *out2 = rawout2; + + DCT12_PART1 + + { + real tmp0,tmp1 = (in0 - in4); + { + real tmp2 = REAL_MUL((in1 - in5), tfcos12[1]); + tmp0 = tmp1 + tmp2; + tmp1 -= tmp2; + } + out2[5-1] = REAL_MUL(tmp0, wi[11-1]); + out2[0+1] = REAL_MUL(tmp0, wi[6+1]); + ts[(12+1)*SBLIMIT] += REAL_MUL(tmp1, wi[1]); + ts[(17-1)*SBLIMIT] += REAL_MUL(tmp1, wi[5-1]); + } + + DCT12_PART2 + + out2[5-0] = REAL_MUL(in2, wi[11-0]); + out2[0+0] = REAL_MUL(in2, wi[6+0]); + out2[0+2] = REAL_MUL(in3, wi[6+2]); + out2[5-2] = REAL_MUL(in3, wi[11-2]); + + ts[(12+0)*SBLIMIT] += REAL_MUL(in0, wi[0]); + ts[(17-0)*SBLIMIT] += REAL_MUL(in0, wi[5-0]); + ts[(12+2)*SBLIMIT] += REAL_MUL(in4, wi[2]); + ts[(17-2)*SBLIMIT] += REAL_MUL(in4, wi[5-2]); + } + + in++; + + { + real in0,in1,in2,in3,in4,in5; + register real *out2 = rawout2; + out2[12]=out2[13]=out2[14]=out2[15]=out2[16]=out2[17]=0.0; + + DCT12_PART1 + + { + real tmp0,tmp1 = (in0 - in4); + { + real tmp2 = REAL_MUL((in1 - in5), tfcos12[1]); + tmp0 = tmp1 + tmp2; + tmp1 -= tmp2; + } + out2[11-1] = REAL_MUL(tmp0, wi[11-1]); + out2[6 +1] = REAL_MUL(tmp0, wi[6+1]); + out2[0+1] += REAL_MUL(tmp1, wi[1]); + out2[5-1] += REAL_MUL(tmp1, wi[5-1]); + } + + DCT12_PART2 + + out2[11-0] = REAL_MUL(in2, wi[11-0]); + out2[6 +0] = REAL_MUL(in2, wi[6+0]); + out2[6 +2] = REAL_MUL(in3, wi[6+2]); + out2[11-2] = REAL_MUL(in3, wi[11-2]); + + out2[0+0] += REAL_MUL(in0, wi[0]); + out2[5-0] += REAL_MUL(in0, wi[5-0]); + out2[0+2] += REAL_MUL(in4, wi[2]); + out2[5-2] += REAL_MUL(in4, wi[5-2]); + } +} + + +static void III_hybrid(real fsIn[SBLIMIT][SSLIMIT], real tsOut[SSLIMIT][SBLIMIT], int ch,struct gr_info_s *gr_info, mpg123_handle *fr) +{ + real (*block)[2][SBLIMIT*SSLIMIT] = fr->hybrid_block; + int *blc = fr->hybrid_blc; + + real *tspnt = (real *) tsOut; + real *rawout1,*rawout2; + int bt = 0; + size_t sb = 0; + + { + int b = blc[ch]; + rawout1=block[b][ch]; + b=-b+1; + rawout2=block[b][ch]; + blc[ch] = b; + } + + if(gr_info->mixed_block_flag) + { + sb = 2; + opt_dct36(fr)(fsIn[0],rawout1,rawout2,win[0],tspnt); + opt_dct36(fr)(fsIn[1],rawout1+18,rawout2+18,win1[0],tspnt+1); + rawout1 += 36; rawout2 += 36; tspnt += 2; + } + + bt = gr_info->block_type; + if(bt == 2) + { + for(; sbmaxb; sb+=2,tspnt+=2,rawout1+=36,rawout2+=36) + { + dct12(fsIn[sb] ,rawout1 ,rawout2 ,win[2] ,tspnt); + dct12(fsIn[sb+1],rawout1+18,rawout2+18,win1[2],tspnt+1); + } + } + else + { + for(; sbmaxb; sb+=2,tspnt+=2,rawout1+=36,rawout2+=36) + { + opt_dct36(fr)(fsIn[sb],rawout1,rawout2,win[bt],tspnt); + opt_dct36(fr)(fsIn[sb+1],rawout1+18,rawout2+18,win1[bt],tspnt+1); + } + } + + for(;sbstereo; + int single = fr->single; + int ms_stereo,i_stereo; + int sfreq = fr->sampling_frequency; + int stereo1,granules; + + if(stereo == 1) + { /* stream is mono */ + stereo1 = 1; + single = SINGLE_LEFT; + } + else if(single != SINGLE_STEREO) /* stream is stereo, but force to mono */ + stereo1 = 1; + else + stereo1 = 2; + + if(fr->mode == MPG_MD_JOINT_STEREO) + { + ms_stereo = (fr->mode_ext & 0x2)>>1; + i_stereo = fr->mode_ext & 0x1; + } + else ms_stereo = i_stereo = 0; + + granules = fr->lsf ? 1 : 2; + + /* quick hack to keep the music playing */ + /* after having seen this nasty test file... */ + if(III_get_side_info(fr, &sideinfo,stereo,ms_stereo,sfreq,single)) + { + if(NOQUIET) error("bad frame - unable to get valid sideinfo"); + return clip; + } + + set_pointer(fr,sideinfo.main_data_begin); + + for(gr=0;grlayer3.hybrid_in; + /* hybridOut[2][SSLIMIT][SBLIMIT] */ + real (*hybridOut)[SSLIMIT][SBLIMIT] = fr->layer3.hybrid_out; + + { + struct gr_info_s *gr_info = &(sideinfo.ch[0].gr[gr]); + long part2bits; + if(fr->lsf) + part2bits = III_get_scale_factors_2(fr, scalefacs[0],gr_info,0); + else + part2bits = III_get_scale_factors_1(fr, scalefacs[0],gr_info,0,gr); + + if(III_dequantize_sample(fr, hybridIn[0], scalefacs[0],gr_info,sfreq,part2bits)) + { + if(VERBOSE2) error("dequantization failed!"); + return clip; + } + } + + if(stereo == 2) + { + struct gr_info_s *gr_info = &(sideinfo.ch[1].gr[gr]); + long part2bits; + if(fr->lsf) + part2bits = III_get_scale_factors_2(fr, scalefacs[1],gr_info,i_stereo); + else + part2bits = III_get_scale_factors_1(fr, scalefacs[1],gr_info,1,gr); + + if(III_dequantize_sample(fr, hybridIn[1],scalefacs[1],gr_info,sfreq,part2bits)) + { + if(VERBOSE2) error("dequantization failed!"); + return clip; + } + + if(ms_stereo) + { + int i; + unsigned int maxb = sideinfo.ch[0].gr[gr].maxb; + if(sideinfo.ch[1].gr[gr].maxb > maxb) maxb = sideinfo.ch[1].gr[gr].maxb; + + for(i=0;ilsf); + + if(ms_stereo || i_stereo || (single == SINGLE_MIX) ) + { + if(gr_info->maxb > sideinfo.ch[0].gr[gr].maxb) + sideinfo.ch[0].gr[gr].maxb = gr_info->maxb; + else + gr_info->maxb = sideinfo.ch[0].gr[gr].maxb; + } + + switch(single) + { + case SINGLE_MIX: + { + register int i; + register real *in0 = (real *) hybridIn[0],*in1 = (real *) hybridIn[1]; + for(i=0;imaxb;i++,in0++) + *in0 = (*in0 + *in1++); /* *0.5 done by pow-scale */ + } + break; + case SINGLE_RIGHT: + { + register int i; + register real *in0 = (real *) hybridIn[0],*in1 = (real *) hybridIn[1]; + for(i=0;imaxb;i++) + *in0++ = *in1++; + } + break; + } + } + + for(ch=0;chaf.encoding != MPG123_ENC_SIGNED_16 || fr->down_sample != 0) + { +#endif + for(ss=0;sssynth_mono)(hybridOut[0][ss], fr); + else + clip += (fr->synth_stereo)(hybridOut[0][ss], hybridOut[1][ss], fr); + + } +#ifdef OPT_I486 + } else + { + /* Only stereo, 16 bits benefit from the 486 optimization. */ + ss=0; + while(ss < SSLIMIT) + { + int n; + n=(fr->buffer.size - fr->buffer.fill) / (2*2*32); + if(n > (SSLIMIT-ss)) n=SSLIMIT-ss; + + /* Clip counting makes no sense with this function. */ + absynth_1to1_i486(hybridOut[0][ss], 0, fr, n); + absynth_1to1_i486(hybridOut[1][ss], 1, fr, n); + ss+=n; + fr->buffer.fill+=(2*2*32)*n; + } + } +#endif + } + + return clip; +} diff --git a/deps/mpg123/src/libmpg123/lfs_alias.c b/deps/mpg123/src/libmpg123/lfs_alias.c new file mode 100644 index 0000000..9b018e3 --- /dev/null +++ b/deps/mpg123/src/libmpg123/lfs_alias.c @@ -0,0 +1,252 @@ +/* + lfs_alias: Aliases to the small/native API functions with the size of long int as suffix. + + copyright 2010 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Thomas Orgis + + Use case: Client code on Linux/x86-64 that defines _FILE_OFFSET_BITS to 64, which is the only choice on that platform anyway. It should be no-op, but prompts the platform-agnostic header of mpg123 to define API calls with the corresponding suffix. + This file provides the names for this case. It's cruft, but glibc does it, too -- so people rely on it. + Oh, and it also caters for the lunatics that define _FILE_OFFSET_BITS=32 on 32 bit platforms. + + There is also the strange case that the mpg123 build itself is configured for unnecessary _FILE_OFFSET_BITS == LFS_ALIAS_BITS =^ sizeof(long). In that case, the "native" function will have the suffix and the alias shall be provided without the suffix. + + So, two basic cases: + 1. mpg123_bla_32 alias for mpg123_bla + 2. mpg123_bla alias for mpg123_bla_32 + Confusing, I know. It sucks. +*/ + +#include "config.h" + +/* Hack for Solaris: Some system headers included from compat.h might force _FILE_OFFSET_BITS. Need to follow that here. */ +#include "compat.h" + +#ifndef LFS_ALIAS_BITS +#error "I need the count of alias bits here." +#endif + +#define MACROCAT_REALLY(a, b) a ## b +#define MACROCAT(a, b) MACROCAT_REALLY(a, b) + +/* This is wicked switchery: Decide which way the aliases are facing. */ + +#if _FILE_OFFSET_BITS+0 == LFS_ALIAS_BITS + +/* The native functions are actually _with_ suffix, so let the mpg123 header use large file hackery to define the correct interfaces. */ +#include "mpg123.h" +/* Don't forget to undef the function symbols before usage... */ + +/* The native functions have suffix, the aliases not. */ +#define NATIVE_SUFFIX MACROCAT(_, _FILE_OFFSET_BITS) +#define NATIVE_NAME(func) MACROCAT(func, NATIVE_SUFFIX) +#define ALIAS_NAME(func) func + +#else + +/* Native functions are without suffix... */ +#define MPG123_NO_LARGENAME +#include "mpg123.h" + +/* The alias functions have suffix, the native ones not. */ +#define ALIAS_SUFFIX MACROCAT(_, LFS_ALIAS_BITS) +#define ALIAS_NAME(func) MACROCAT(func, ALIAS_SUFFIX) +#define NATIVE_NAME(func) func + +#endif + +/* Now get the rest of the infrastructure on speed, namely attribute_align_arg, to stay safe. */ +#include "mpg123lib_intern.h" + +/* + Extract the list of functions we need wrappers for, pregenerating the wrappers for simple cases (inline script for nedit): +perl -ne ' +if(/^\s*EXPORT\s+(\S+)\s+(mpg123_\S+)\((.*)\);\s*$/) +{ + my $type = $1; + my $name = $2; + my $args = $3; + next unless ($type =~ /off_t/ or $args =~ /off_t/ or ($name =~ /open/ and $name ne mpg123_open_feed)); + $type =~ s/off_t/long/g; + my @nargs = (); + $args =~ s/off_t/long/g; + foreach my $a (split(/,/, $args)) + { + $a =~ s/^.*\s\**([a-z_]+)$/$1/; + push(@nargs, $a); + } + my $nargs = join(", ", @nargs); + $nargs = "Human: figure me out." if($nargs =~ /\(/); + print < +#include +#include +#include "compat.h" +#include "debug.h" + +/* + Now, start off easy... translate simple API calls. + I need to deal with these here: +perl -ne ' +if(/^\s*EXPORT\s+(\S+)\s+(mpg123_\S+)\((.*)\);\s*$/) +{ + $type = $1; + $name = $2; + $args = $3; + next unless ($type =~ /off_t/ or $args =~ /off_t/); + print "$name\n" unless grep {$_ eq $name} + ("mpg123_open", "mpg123_open_fd", "mpg123_open_handle", "mpg123_replace_reader", "mpg123_replace_reader_handle"); +}' < mpg123.h.in + +mpg123_decode_frame +mpg123_framebyframe_decode +mpg123_framepos +mpg123_tell +mpg123_tellframe +mpg123_tell_stream +mpg123_seek +mpg123_feedseek +mpg123_seek_frame +mpg123_timeframe +mpg123_index +mpg123_set_index +mpg123_position +mpg123_length +mpg123_set_filesize +mpg123_decode_raw ... that's experimental. + +Let's work on them in that order. +*/ + +/* I see that I will need custom data storage. Main use is for the replaced I/O later, but the seek table for small file offsets needs extra storage, too. */ + +/* The wrapper handle for descriptor and handle I/O. */ + +/* The handle is used for nothing (0), or one of these two modes of operation: */ +#define IO_FD 1 /* Wrapping over callbacks operation on integer file descriptor. */ +#define IO_HANDLE 2 /* Wrapping over custom handle callbacks. */ + +struct wrap_data +{ + /* Storage for small offset index table. */ + long *indextable; + /* I/O handle stuff */ + int iotype; /* IO_FD or IO_HANDLE */ + /* Data for IO_FD. */ + int fd; + int my_fd; /* A descriptor that the wrapper code opened itself. */ + /* The actual callbacks from the outside. */ + ssize_t (*r_read) (int, void *, size_t); + long (*r_lseek)(int, long, int); + /* Data for IO_HANDLE. */ + void* handle; + ssize_t (*r_h_read)(void *, void *, size_t); + long (*r_h_lseek)(void*, long, int); + void (*h_cleanup)(void*); +}; + + +/* Cleanup I/O part of the handle handle... but not deleting the wrapper handle itself. + That is stored in the frame and only deleted on mpg123_delete(). */ +static void wrap_io_cleanup(void *handle) +{ + struct wrap_data *ioh = handle; + if(ioh->iotype == IO_HANDLE) + { + if(ioh->h_cleanup != NULL && ioh->handle != NULL) + ioh->h_cleanup(ioh->handle); + + ioh->handle = NULL; + } + if(ioh->my_fd >= 0) + { + close(ioh->my_fd); + ioh->my_fd = -1; + } +} + +/* Really finish off the handle... freeing all memory. */ +static void wrap_destroy(void *handle) +{ + struct wrap_data *wh = handle; + wrap_io_cleanup(handle); + if(wh->indextable != NULL) + free(wh->indextable); + + free(wh); +} + +/* More helper code... extract the special wrapper handle, possible allocate and initialize it. */ +static struct wrap_data* wrap_get(mpg123_handle *mh) +{ + struct wrap_data* whd; + if(mh == NULL) return NULL; + + /* Access the private storage inside the mpg123 handle. + The real callback functions and handles are stored there. */ + if(mh->wrapperdata == NULL) + { + /* Create a new one. */ + mh->wrapperdata = malloc(sizeof(struct wrap_data)); + if(mh->wrapperdata == NULL) + { + mh->err = MPG123_OUT_OF_MEM; + return NULL; + } + /* When we have wrapper data present, the callback for its proper cleanup is needed. */ + mh->wrapperclean = wrap_destroy; + + whd = mh->wrapperdata; + whd->indextable = NULL; + whd->iotype = 0; + whd->fd = -1; + whd->my_fd = -1; + whd->r_read = NULL; + whd->r_lseek = NULL; + whd->handle = NULL; + whd->r_h_read = NULL; + whd->r_h_lseek = NULL; + whd->h_cleanup = NULL; + } + else whd = mh->wrapperdata; + + return whd; +} + +/* After settling the data... start with some simple wrappers. */ + +#undef mpg123_decode_frame +/* int mpg123_decode_frame(mpg123_handle *mh, off_t *num, unsigned char **audio, size_t *bytes) */ +int attribute_align_arg mpg123_decode_frame(mpg123_handle *mh, long *num, unsigned char **audio, size_t *bytes) +{ + off_t largenum; + int err; + + err = MPG123_LARGENAME(mpg123_decode_frame)(mh, &largenum, audio, bytes); + if(err == MPG123_OK && num != NULL) + { + *num = largenum; + if(*num != largenum) + { + mh->err = MPG123_LFS_OVERFLOW; + err = MPG123_ERR; + } + } + return err; +} + +#undef mpg123_framebyframe_decode +/* int mpg123_framebyframe_decode(mpg123_handle *mh, off_t *num, unsigned char **audio, size_t *bytes); */ +int attribute_align_arg mpg123_framebyframe_decode(mpg123_handle *mh, long *num, unsigned char **audio, size_t *bytes) +{ + off_t largenum; + int err; + + err = MPG123_LARGENAME(mpg123_framebyframe_decode)(mh, &largenum, audio, bytes); + if(err == MPG123_OK && num != NULL) + { + *num = largenum; + if(*num != largenum) + { + mh->err = MPG123_LFS_OVERFLOW; + err = MPG123_ERR; + } + } + return err; +} + +#undef mpg123_framepos +/* off_t mpg123_framepos(mpg123_handle *mh); */ +long attribute_align_arg mpg123_framepos(mpg123_handle *mh) +{ + long val; + off_t largeval; + + largeval = MPG123_LARGENAME(mpg123_framepos)(mh); + val = largeval; + if(val != largeval) + { + mh->err = MPG123_LFS_OVERFLOW; + return MPG123_ERR; + } + return val; +} + +#undef mpg123_tell +/* off_t mpg123_tell(mpg123_handle *mh); */ +long attribute_align_arg mpg123_tell(mpg123_handle *mh) +{ + long val; + off_t largeval; + + largeval = MPG123_LARGENAME(mpg123_tell)(mh); + val = largeval; + if(val != largeval) + { + mh->err = MPG123_LFS_OVERFLOW; + return MPG123_ERR; + } + return val; +} + +#undef mpg123_tellframe +/* off_t mpg123_tellframe(mpg123_handle *mh); */ +long attribute_align_arg mpg123_tellframe(mpg123_handle *mh) +{ + long val; + off_t largeval; + + largeval = MPG123_LARGENAME(mpg123_tellframe)(mh); + val = largeval; + if(val != largeval) + { + mh->err = MPG123_LFS_OVERFLOW; + return MPG123_ERR; + } + return val; +} + +#undef mpg123_tell_stream +/* off_t mpg123_tell_stream(mpg123_handle *mh); */ +long attribute_align_arg mpg123_tell_stream(mpg123_handle *mh) +{ + long val; + off_t largeval; + + largeval = MPG123_LARGENAME(mpg123_tell_stream)(mh); + val = largeval; + if(val != largeval) + { + mh->err = MPG123_LFS_OVERFLOW; + return MPG123_ERR; + } + return val; +} + +#undef mpg123_seek +/* off_t mpg123_seek(mpg123_handle *mh, off_t sampleoff, int whence); */ +long attribute_align_arg mpg123_seek(mpg123_handle *mh, long sampleoff, int whence) +{ + long val; + off_t largeval; + + largeval = MPG123_LARGENAME(mpg123_seek)(mh, sampleoff, whence); + val = largeval; + if(val != largeval) + { + mh->err = MPG123_LFS_OVERFLOW; + return MPG123_ERR; + } + return val; +} + +#undef mpg123_feedseek +/* off_t mpg123_feedseek(mpg123_handle *mh, off_t sampleoff, int whence, off_t *input_offset); */ +long attribute_align_arg mpg123_feedseek(mpg123_handle *mh, long sampleoff, int whence, long *input_offset) +{ + long val; + off_t largeioff; + off_t largeval; + + largeval = MPG123_LARGENAME(mpg123_feedseek)(mh, sampleoff, whence, &largeioff); + /* Error/message codes are small... */ + if(largeval < 0) return (long)largeval; + + val = largeval; + *input_offset = largeioff; + if(val != largeval || *input_offset != largeioff) + { + mh->err = MPG123_LFS_OVERFLOW; + return MPG123_ERR; + } + return val; +} + +#undef mpg123_seek_frame +/* off_t mpg123_seek_frame(mpg123_handle *mh, off_t frameoff, int whence); */ +long attribute_align_arg mpg123_seek_frame(mpg123_handle *mh, long frameoff, int whence) +{ + long val; + off_t largeval; + + largeval = MPG123_LARGENAME(mpg123_seek_frame)(mh, frameoff, whence); + val = largeval; + if(val != largeval) + { + mh->err = MPG123_LFS_OVERFLOW; + return MPG123_ERR; + } + return val; +} + +#undef mpg123_timeframe +/* off_t mpg123_timeframe(mpg123_handle *mh, double sec); */ +long attribute_align_arg mpg123_timeframe(mpg123_handle *mh, double sec) +{ + long val; + off_t largeval; + + largeval = MPG123_LARGENAME(mpg123_timeframe)(mh, sec); + val = largeval; + if(val != largeval) + { + mh->err = MPG123_LFS_OVERFLOW; + return MPG123_ERR; + } + return val; +} + +/* Now something less simple: Index retrieval and manipulation. + The index is an _array_ of off_t, which means that I need to construct a copy with translated long values. */ +#undef mpg123_index +/* int mpg123_index(mpg123_handle *mh, off_t **offsets, off_t *step, size_t *fill) */ +int attribute_align_arg mpg123_index(mpg123_handle *mh, long **offsets, long *step, size_t *fill) +{ + int err; + size_t i; + long smallstep; + size_t thefill; + off_t largestep; + off_t *largeoffsets; + struct wrap_data *whd; + + whd = wrap_get(mh); + if(whd == NULL) return MPG123_ERR; + + err = MPG123_LARGENAME(mpg123_index)(mh, &largeoffsets, &largestep, &thefill); + if(err != MPG123_OK) return err; + + /* For a _very_ large file, even the step could overflow. */ + smallstep = largestep; + if(smallstep != largestep) + { + mh->err = MPG123_LFS_OVERFLOW; + return MPG123_ERR; + } + if(step != NULL) *step = smallstep; + + /* When there are no values stored, there is no table content to take care of. + Table pointer does not matter. Mission completed. */ + if(thefill == 0) return MPG123_OK; + + if(fill != NULL) *fill = thefill; + + /* Construct a copy of the index to hand over to the small-minded client. */ + *offsets = safe_realloc(whd->indextable, (*fill)*sizeof(long)); + if(*offsets == NULL) + { + mh->err = MPG123_OUT_OF_MEM; + return MPG123_ERR; + } + whd->indextable = *offsets; + /* Elaborate conversion of each index value, with overflow check. */ + for(i=0; i<*fill; ++i) + { + whd->indextable[i] = largeoffsets[i]; + if(whd->indextable[i] != largeoffsets[i]) + { + mh->err = MPG123_LFS_OVERFLOW; + return MPG123_ERR; + } + } + /* If we came that far... there should be a valid copy of the table now. */ + return MPG123_OK; +} + +/* The writing does basically the same than the above, just the opposite. + Oh, and the overflow checks are not needed -- off_t is bigger than long. */ +#undef mpg123_set_index +/* int mpg123_set_index(mpg123_handle *mh, off_t *offsets, off_t step, size_t fill); */ +int attribute_align_arg mpg123_set_index(mpg123_handle *mh, long *offsets, long step, size_t fill) +{ + int err; + size_t i; + struct wrap_data *whd; + off_t *indextmp; + + whd = wrap_get(mh); + if(whd == NULL) return MPG123_ERR; + + /* Expensive temporary storage... for staying outside at the API layer. */ + indextmp = malloc(fill*sizeof(off_t)); + if(indextmp == NULL) + { + mh->err = MPG123_OUT_OF_MEM; + return MPG123_ERR; + } + + if(fill > 0 && offsets == NULL) + { + mh->err = MPG123_BAD_INDEX_PAR; + err = MPG123_ERR; + } + else + { + /* Fill the large-file copy of the provided index, then feed it to mpg123. */ + for(i=0; ierr = MPG123_LFS_OVERFLOW; + return MPG123_ERR; + } + + if(current_frame != NULL) *current_frame = small_curframe; + + if(frames_left != NULL) *frames_left = small_frameleft; + + + return MPG123_OK; +} + +#undef mpg123_length +/* off_t mpg123_length(mpg123_handle *mh); */ +long attribute_align_arg mpg123_length(mpg123_handle *mh) +{ + long val; + off_t largeval; + + largeval = MPG123_LARGENAME(mpg123_length)(mh); + val = largeval; + if(val != largeval) + { + mh->err = MPG123_LFS_OVERFLOW; + return MPG123_ERR; + } + return val; +} + +/* The simplest wrapper of all... */ +#undef mpg123_set_filesize +/* int mpg123_set_filesize(mpg123_handle *mh, off_t size); */ +int attribute_align_arg mpg123_set_filesize(mpg123_handle *mh, long size) +{ + return MPG123_LARGENAME(mpg123_set_filesize)(mh, size); +} + + +/* ========================================= + THE BOUNDARY OF SANITY + Behold, stranger! + ========================================= */ + + +/* + The messy part: Replacement of I/O core (actally, this is only due to lseek()). + Both descriptor and handle replaced I/O are mapped to replaced handle I/O, the handle wrapping over the actual callbacks and the actual handle/descriptor. + You got multiple levels of handles and callbacks to think about. Have fun reading and comprehending. +*/ + +/* Could go into compat.h ... Windows needs that flag. */ +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +/* Read callback needs nothing special. */ +ssize_t wrap_read(void* handle, void *buf, size_t count) +{ + struct wrap_data *ioh = handle; + switch(ioh->iotype) + { + case IO_FD: return ioh->r_read(ioh->fd, buf, count); + case IO_HANDLE: return ioh->r_h_read(ioh->handle, buf, count); + } + error("Serious breakage - bad IO type in LFS wrapper!"); + return -1; +} + +/* Seek callback needs protection from too big offsets. */ +off_t wrap_lseek(void *handle, off_t offset, int whence) +{ + struct wrap_data *ioh = handle; + long smalloff = offset; + if(smalloff == offset) + { + switch(ioh->iotype) + { + case IO_FD: return ioh->r_lseek(ioh->fd, smalloff, whence); + case IO_HANDLE: return ioh->r_h_lseek(ioh->handle, smalloff, whence); + } + error("Serious breakage - bad IO type in LFS wrapper!"); + return -1; + } + else + { + errno = EOVERFLOW; + return -1; + } +} + + +/* + Now, let's replace the API dealing with replacement I/O. + Start with undefining the renames... +*/ + +#undef mpg123_replace_reader +#undef mpg123_replace_reader_handle +#undef mpg123_open +#undef mpg123_open_fd +#undef mpg123_open_handle + + +/* Normal reader replacement needs fallback implementations. */ +static ssize_t fallback_read(int fd, void *buf, size_t count) +{ + return read(fd, buf, count); +} + +static long fallback_lseek(int fd, long offset, int whence) +{ + /* Since the offset is long int already, the returned value really should fit into a long... but whatever. */ + long newpos_long; + off_t newpos; + newpos = lseek(fd, offset, whence); + newpos_long = newpos; + if(newpos_long == newpos) + return newpos_long; + else + { + errno = EOVERFLOW; + return -1; + } +} + +/* Reader replacement prepares the hidden handle storage for next mpg123_open_fd() or plain mpg123_open(). */ +int attribute_align_arg mpg123_replace_reader(mpg123_handle *mh, ssize_t (*r_read) (int, void *, size_t), long (*r_lseek)(int, long, int) ) +{ + struct wrap_data* ioh; + + if(mh == NULL) return MPG123_ERR; + + mpg123_close(mh); + ioh = wrap_get(mh); + if(ioh == NULL) return MPG123_ERR; + + /* If both callbacks are NULL, switch totally to internal I/O, else just use fallback for at most half of them. */ + if(r_read == NULL && r_lseek == NULL) + { + /* Only the type is actually important to disable the code. */ + ioh->iotype = 0; + ioh->fd = -1; + ioh->r_read = NULL; + ioh->r_lseek = NULL; + } + else + { + ioh->iotype = IO_FD; + ioh->fd = -1; /* On next mpg123_open_fd(), this gets a value. */ + ioh->r_read = r_read != NULL ? r_read : fallback_read; + ioh->r_lseek = r_lseek != NULL ? r_lseek : fallback_lseek; + } + + /* The real reader replacement will happen while opening. */ + return MPG123_OK; +} + +int attribute_align_arg mpg123_replace_reader_handle(mpg123_handle *mh, ssize_t (*r_read) (void*, void *, size_t), long (*r_lseek)(void*, long, int), void (*cleanup)(void*)) +{ + struct wrap_data* ioh; + + if(mh == NULL) return MPG123_ERR; + + mpg123_close(mh); + ioh = wrap_get(mh); + if(ioh == NULL) return MPG123_ERR; + + ioh->iotype = IO_HANDLE; + ioh->handle = NULL; + ioh->r_h_read = r_read; + ioh->r_h_lseek = r_lseek; + ioh->h_cleanup = cleanup; + + /* The real reader replacement will happen while opening. */ + return MPG123_OK; +} + +/* + The open routines always need to watch out for a prepared wrapper handle to use replaced normal I/O. + Two cases to consider: + 1. Plain normal open using internal I/O. + 2. Client called mpg123_replace_reader() before. + The second case needs hackery to activate the client I/O callbacks. For that, we create a custom I/O handle and use the guts of mpg123_open_fd() on it. +*/ +int attribute_align_arg mpg123_open(mpg123_handle *mh, const char *path) +{ + struct wrap_data* ioh; + + if(mh == NULL) return MPG123_ERR; + + ioh = mh->wrapperdata; + /* Mimic the use of mpg123_replace_reader() functions by lower levels... + IO_HANDLE is not valid here, though. Only IO_FD. */ + if(ioh != NULL && ioh->iotype == IO_FD) + { + int err; + err = MPG123_LARGENAME(mpg123_replace_reader_handle)(mh, wrap_read, wrap_lseek, wrap_io_cleanup); + if(err != MPG123_OK) return MPG123_ERR; + + /* The above call implied mpg123_close() already */ + /* + I really need to open the file here... to be able to use the replacer handle I/O ... + my_fd is used to indicate closing of the descriptor on cleanup. + */ + ioh->my_fd = compat_open(path, O_RDONLY|O_BINARY); + if(ioh->my_fd < 0) + { + if(!(mh->p.flags & MPG123_QUIET)) error2("Cannot open file %s: %s", path, strerror(errno)); + + mh->err = MPG123_BAD_FILE; + return MPG123_ERR; + } + /* Store a copy of the descriptor where it is actually used. */ + ioh->fd = ioh->my_fd; + /* Initiate I/O operating on my handle now. */ + err = open_stream_handle(mh, ioh); + if(err != MPG123_OK) + { + wrap_io_cleanup(ioh); + return MPG123_ERR; + } + /* All fine... */ + return MPG123_OK; + } + else return MPG123_LARGENAME(mpg123_open)(mh, path); +} + +/* + This is in fact very similar to the above: + The open routines always need to watch out for a prepared wrapper handle to use replaced normal I/O. + Two cases to consider: + 1. Plain normal open_fd using internal I/O. + 2. Client called mpg123_replace_reader() before. + The second case needs hackery to activate the client I/O callbacks. For that, we create a custom I/O handle and use the guts of mpg123_open_fd() on it. +*/ + +int attribute_align_arg mpg123_open_fd(mpg123_handle *mh, int fd) +{ + struct wrap_data* ioh; + + if(mh == NULL) return MPG123_ERR; + + mpg123_close(mh); + ioh = mh->wrapperdata; + if(ioh != NULL && ioh->iotype == IO_FD) + { + int err; + err = MPG123_LARGENAME(mpg123_replace_reader_handle)(mh, wrap_read, wrap_lseek, wrap_io_cleanup); + if(err != MPG123_OK) return MPG123_ERR; + + /* The above call implied mpg123_close() already */ + + /* Store the real file descriptor inside the handle. */ + ioh->fd = fd; + /* Initiate I/O operating on my handle now. */ + err = open_stream_handle(mh, ioh); + if(err != MPG123_OK) + { + wrap_io_cleanup(ioh); + return MPG123_ERR; + } + /* All fine... */ + return MPG123_OK; + } + else return MPG123_LARGENAME(mpg123_open_fd)(mh, fd); +} + +int attribute_align_arg mpg123_open_handle(mpg123_handle *mh, void *handle) +{ + struct wrap_data* ioh; + + if(mh == NULL) return MPG123_ERR; + + mpg123_close(mh); + ioh = mh->wrapperdata; + if(ioh != NULL && ioh->iotype == IO_HANDLE && ioh->r_h_read != NULL) + { + /* Wrap the custom handle into my handle. */ + int err; + err = MPG123_LARGENAME(mpg123_replace_reader_handle)(mh, wrap_read, wrap_lseek, wrap_io_cleanup); + if(err != MPG123_OK) return MPG123_ERR; + + ioh->handle = handle; + /* No extra error handling, keep behaviour of the original open_handle. */ + return open_stream_handle(mh, ioh); + } + else + { + /* This is an error ... you need to prepare the I/O before using it. */ + mh->err = MPG123_BAD_CUSTOM_IO; + return MPG123_ERR; + } +} + diff --git a/deps/mpg123/src/libmpg123/libmpg123.c b/deps/mpg123/src/libmpg123/libmpg123.c new file mode 100644 index 0000000..59a8a8e --- /dev/null +++ b/deps/mpg123/src/libmpg123/libmpg123.c @@ -0,0 +1,1607 @@ +/* + libmpg123: MPEG Audio Decoder library + + copyright 1995-2012 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + +*/ + +#include "mpg123lib_intern.h" +#include "icy2utf8.h" +#include "debug.h" + +#include "gapless.h" + +#define SEEKFRAME(mh) ((mh)->ignoreframe < 0 ? 0 : (mh)->ignoreframe) + +static int initialized = 0; + +int attribute_align_arg mpg123_init(void) +{ + if((sizeof(short) != 2) || (sizeof(long) < 4)) return MPG123_BAD_TYPES; + + if(initialized) return MPG123_OK; /* no need to initialize twice */ + +#ifndef NO_LAYER12 + init_layer12(); /* inits also shared tables with layer1 */ +#endif +#ifndef NO_LAYER3 + init_layer3(); +#endif + prepare_decode_tables(); + check_decoders(); + initialized = 1; + return MPG123_OK; +} + +void attribute_align_arg mpg123_exit(void) +{ + /* nothing yet, but something later perhaps */ +} + +/* create a new handle with specified decoder, decoder can be "", "auto" or NULL for auto-detection */ +mpg123_handle attribute_align_arg *mpg123_new(const char* decoder, int *error) +{ + return mpg123_parnew(NULL, decoder, error); +} + +/* ...the full routine with optional initial parameters to override defaults. */ +mpg123_handle attribute_align_arg *mpg123_parnew(mpg123_pars *mp, const char* decoder, int *error) +{ + mpg123_handle *fr = NULL; + int err = MPG123_OK; + + if(initialized) fr = (mpg123_handle*) malloc(sizeof(mpg123_handle)); + else err = MPG123_NOT_INITIALIZED; + if(fr != NULL) + { + frame_init_par(fr, mp); + debug("cpu opt setting"); + if(frame_cpu_opt(fr, decoder) != 1) + { + err = MPG123_BAD_DECODER; + frame_exit(fr); + free(fr); + fr = NULL; + } + } + if(fr != NULL) + { + fr->decoder_change = 1; + } + else if(err == MPG123_OK) err = MPG123_OUT_OF_MEM; + + if(error != NULL) *error = err; + return fr; +} + +int attribute_align_arg mpg123_decoder(mpg123_handle *mh, const char* decoder) +{ + enum optdec dt = dectype(decoder); + + if(mh == NULL) return MPG123_ERR; + + if(dt == nodec) + { + mh->err = MPG123_BAD_DECODER; + return MPG123_ERR; + } + if(dt == mh->cpu_opts.type) return MPG123_OK; + + /* Now really change. */ + /* frame_exit(mh); + frame_init(mh); */ + debug("cpu opt setting"); + if(frame_cpu_opt(mh, decoder) != 1) + { + mh->err = MPG123_BAD_DECODER; + frame_exit(mh); + return MPG123_ERR; + } + /* New buffers for decoder are created in frame_buffers() */ + if((frame_outbuffer(mh) != 0)) + { + mh->err = MPG123_NO_BUFFERS; + frame_exit(mh); + return MPG123_ERR; + } + /* Do _not_ call decode_update here! That is only allowed after a first MPEG frame has been met. */ + mh->decoder_change = 1; + return MPG123_OK; +} + +int attribute_align_arg mpg123_param(mpg123_handle *mh, enum mpg123_parms key, long val, double fval) +{ + int r; + + if(mh == NULL) return MPG123_ERR; + r = mpg123_par(&mh->p, key, val, fval); + if(r != MPG123_OK){ mh->err = r; r = MPG123_ERR; } + else + { /* Special treatment for some settings. */ +#ifdef FRAME_INDEX + if(key == MPG123_INDEX_SIZE) + { /* Apply frame index size and grow property on the fly. */ + r = frame_index_setup(mh); + if(r != MPG123_OK) mh->err = MPG123_INDEX_FAIL; + } +#endif +#ifndef NO_FEEDER + /* Feeder pool size is applied right away, reader will react to that. */ + if(key == MPG123_FEEDPOOL || key == MPG123_FEEDBUFFER) + bc_poolsize(&mh->rdat.buffer, mh->p.feedpool, mh->p.feedbuffer); +#endif + } + return r; +} + +int attribute_align_arg mpg123_par(mpg123_pars *mp, enum mpg123_parms key, long val, double fval) +{ + int ret = MPG123_OK; + + if(mp == NULL) return MPG123_BAD_PARS; + switch(key) + { + case MPG123_VERBOSE: + mp->verbose = val; + break; + case MPG123_FLAGS: +#ifndef GAPLESS + if(val & MPG123_GAPLESS) ret = MPG123_NO_GAPLESS; +#endif + if(ret == MPG123_OK) mp->flags = val; + debug1("set flags to 0x%lx", (unsigned long) mp->flags); + break; + case MPG123_ADD_FLAGS: +#ifndef GAPLESS + /* Enabling of gapless mode doesn't work when it's not there, but disabling (below) is no problem. */ + if(val & MPG123_GAPLESS) ret = MPG123_NO_GAPLESS; + else +#endif + mp->flags |= val; + debug1("set flags to 0x%lx", (unsigned long) mp->flags); + break; + case MPG123_REMOVE_FLAGS: + mp->flags &= ~val; + debug1("set flags to 0x%lx", (unsigned long) mp->flags); + break; + case MPG123_FORCE_RATE: /* should this trigger something? */ +#ifdef NO_NTOM + if(val > 0) + ret = MPG123_BAD_RATE; +#else + if(val > 96000) ret = MPG123_BAD_RATE; + else mp->force_rate = val < 0 ? 0 : val; /* >0 means enable, 0 disable */ +#endif + break; + case MPG123_DOWN_SAMPLE: +#ifdef NO_DOWNSAMPLE + if(val != 0) ret = MPG123_BAD_RATE; +#else + if(val < 0 || val > 2) ret = MPG123_BAD_RATE; + else mp->down_sample = (int)val; +#endif + break; + case MPG123_RVA: + if(val < 0 || val > MPG123_RVA_MAX) ret = MPG123_BAD_RVA; + else mp->rva = (int)val; + break; + case MPG123_DOWNSPEED: + mp->halfspeed = val < 0 ? 0 : val; + break; + case MPG123_UPSPEED: + mp->doublespeed = val < 0 ? 0 : val; + break; + case MPG123_ICY_INTERVAL: +#ifndef NO_ICY + mp->icy_interval = val > 0 ? val : 0; +#else + if(val > 0) ret = MPG123_BAD_PARAM; +#endif + break; + case MPG123_OUTSCALE: + /* Choose the value that is non-zero, if any. + Downscaling integers to 1.0 . */ + mp->outscale = val == 0 ? fval : (double)val/SHORT_SCALE; + break; + case MPG123_TIMEOUT: +#ifdef TIMEOUT_READ + mp->timeout = val >= 0 ? val : 0; +#else + if(val > 0) ret = MPG123_NO_TIMEOUT; +#endif + break; + case MPG123_RESYNC_LIMIT: + mp->resync_limit = val; + break; + case MPG123_INDEX_SIZE: +#ifdef FRAME_INDEX + mp->index_size = val; +#else + ret = MPG123_NO_INDEX; +#endif + break; + case MPG123_PREFRAMES: + if(val >= 0) mp->preframes = val; + else ret = MPG123_BAD_VALUE; + break; + case MPG123_FEEDPOOL: +#ifndef NO_FEEDER + if(val >= 0) mp->feedpool = val; + else ret = MPG123_BAD_VALUE; +#else + ret = MPG123_MISSING_FEATURE; +#endif + break; + case MPG123_FEEDBUFFER: +#ifndef NO_FEEDER + if(val > 0) mp->feedbuffer = val; + else ret = MPG123_BAD_VALUE; +#else + ret = MPG123_MISSING_FEATURE; +#endif + break; + default: + ret = MPG123_BAD_PARAM; + } + return ret; +} + +int attribute_align_arg mpg123_getparam(mpg123_handle *mh, enum mpg123_parms key, long *val, double *fval) +{ + int r; + + if(mh == NULL) return MPG123_ERR; + r = mpg123_getpar(&mh->p, key, val, fval); + if(r != MPG123_OK){ mh->err = r; r = MPG123_ERR; } + return r; +} + +int attribute_align_arg mpg123_getpar(mpg123_pars *mp, enum mpg123_parms key, long *val, double *fval) +{ + int ret = 0; + + if(mp == NULL) return MPG123_BAD_PARS; + switch(key) + { + case MPG123_VERBOSE: + if(val) *val = mp->verbose; + break; + case MPG123_FLAGS: + case MPG123_ADD_FLAGS: + if(val) *val = mp->flags; + break; + case MPG123_FORCE_RATE: + if(val) +#ifdef NO_NTOM + *val = 0; +#else + *val = mp->force_rate; +#endif + break; + case MPG123_DOWN_SAMPLE: + if(val) *val = mp->down_sample; + break; + case MPG123_RVA: + if(val) *val = mp->rva; + break; + case MPG123_DOWNSPEED: + if(val) *val = mp->halfspeed; + break; + case MPG123_UPSPEED: + if(val) *val = mp->doublespeed; + break; + case MPG123_ICY_INTERVAL: +#ifndef NO_ICY + if(val) *val = (long)mp->icy_interval; +#else + if(val) *val = 0; +#endif + break; + case MPG123_OUTSCALE: + if(fval) *fval = mp->outscale; + if(val) *val = (long)(mp->outscale*SHORT_SCALE); + break; + case MPG123_RESYNC_LIMIT: + if(val) *val = mp->resync_limit; + break; + case MPG123_INDEX_SIZE: + if(val) +#ifdef FRAME_INDEX + *val = mp->index_size; +#else + *val = 0; /* graceful fallback: no index is index of zero size */ +#endif + break; + case MPG123_PREFRAMES: + *val = mp->preframes; + break; + case MPG123_FEEDPOOL: +#ifndef NO_FEEDER + *val = mp->feedpool; +#else + ret = MPG123_MISSING_FEATURE; +#endif + break; + case MPG123_FEEDBUFFER: +#ifndef NO_FEEDER + *val = mp->feedbuffer; +#else + ret = MPG123_MISSING_FEATURE; +#endif + break; + default: + ret = MPG123_BAD_PARAM; + } + return ret; +} + +int attribute_align_arg mpg123_getstate(mpg123_handle *mh, enum mpg123_state key, long *val, double *fval) +{ + int ret = MPG123_OK; + long theval = 0; + double thefval = 0.; + + if(mh == NULL) return MPG123_ERR; + + switch(key) + { + case MPG123_ACCURATE: + theval = mh->state_flags & FRAME_ACCURATE; + break; + case MPG123_FRANKENSTEIN: + theval = mh->state_flags & FRAME_FRANKENSTEIN; + break; + case MPG123_BUFFERFILL: +#ifndef NO_FEEDER + { + size_t sval = bc_fill(&mh->rdat.buffer); + theval = (long)sval; + if((size_t)theval != sval) + { + mh->err = MPG123_INT_OVERFLOW; + ret = MPG123_ERR; + } + } +#else + mh->err = MPG123_MISSING_FEATURE; + ret = MPG123_ERR; +#endif + break; + default: + mh->err = MPG123_BAD_KEY; + ret = MPG123_ERR; + } + + if(val != NULL) *val = theval; + if(fval != NULL) *fval = thefval; + + return ret; +} + +int attribute_align_arg mpg123_eq(mpg123_handle *mh, enum mpg123_channels channel, int band, double val) +{ + if(mh == NULL) return MPG123_ERR; + if(band < 0 || band > 31){ mh->err = MPG123_BAD_BAND; return MPG123_ERR; } + switch(channel) + { + case MPG123_LEFT|MPG123_RIGHT: + mh->equalizer[0][band] = mh->equalizer[1][band] = DOUBLE_TO_REAL(val); + break; + case MPG123_LEFT: mh->equalizer[0][band] = DOUBLE_TO_REAL(val); break; + case MPG123_RIGHT: mh->equalizer[1][band] = DOUBLE_TO_REAL(val); break; + default: + mh->err=MPG123_BAD_CHANNEL; + return MPG123_ERR; + } + mh->have_eq_settings = TRUE; + return MPG123_OK; +} + +double attribute_align_arg mpg123_geteq(mpg123_handle *mh, enum mpg123_channels channel, int band) +{ + double ret = 0.; + + if(mh == NULL) return MPG123_ERR; + + /* Handle this gracefully. When there is no band, it has no volume. */ + if(band > -1 && band < 32) + switch(channel) + { + case MPG123_LEFT|MPG123_RIGHT: + ret = 0.5*(REAL_TO_DOUBLE(mh->equalizer[0][band])+REAL_TO_DOUBLE(mh->equalizer[1][band])); + break; + case MPG123_LEFT: ret = REAL_TO_DOUBLE(mh->equalizer[0][band]); break; + case MPG123_RIGHT: ret = REAL_TO_DOUBLE(mh->equalizer[1][band]); break; + /* Default case is already handled: ret = 0 */ + } + + return ret; +} + + +/* plain file access, no http! */ +int attribute_align_arg mpg123_open(mpg123_handle *mh, const char *path) +{ + if(mh == NULL) return MPG123_ERR; + + mpg123_close(mh); + return open_stream(mh, path, -1); +} + +int attribute_align_arg mpg123_open_fd(mpg123_handle *mh, int fd) +{ + if(mh == NULL) return MPG123_ERR; + + mpg123_close(mh); + return open_stream(mh, NULL, fd); +} + +int attribute_align_arg mpg123_open_handle(mpg123_handle *mh, void *iohandle) +{ + if(mh == NULL) return MPG123_ERR; + + mpg123_close(mh); + if(mh->rdat.r_read_handle == NULL) + { + mh->err = MPG123_BAD_CUSTOM_IO; + return MPG123_ERR; + } + return open_stream_handle(mh, iohandle); +} + +int attribute_align_arg mpg123_open_feed(mpg123_handle *mh) +{ + if(mh == NULL) return MPG123_ERR; + + mpg123_close(mh); + return open_feed(mh); +} + +int attribute_align_arg mpg123_replace_reader( mpg123_handle *mh, + ssize_t (*r_read) (int, void *, size_t), + off_t (*r_lseek)(int, off_t, int) ) +{ + if(mh == NULL) return MPG123_ERR; + + mpg123_close(mh); + mh->rdat.r_read = r_read; + mh->rdat.r_lseek = r_lseek; + return MPG123_OK; +} + +int attribute_align_arg mpg123_replace_reader_handle( mpg123_handle *mh, + ssize_t (*r_read) (void*, void *, size_t), + off_t (*r_lseek)(void*, off_t, int), + void (*cleanup)(void*) ) +{ + if(mh == NULL) return MPG123_ERR; + + mpg123_close(mh); + mh->rdat.r_read_handle = r_read; + mh->rdat.r_lseek_handle = r_lseek; + mh->rdat.cleanup_handle = cleanup; + return MPG123_OK; +} + +/* Update decoding engine for + a) a new choice of decoder + b) a changed native format of the MPEG stream + ... calls are only valid after parsing some MPEG frame! */ +int decode_update(mpg123_handle *mh) +{ + long native_rate; + int b; + + if(mh->num < 0) + { + if(!(mh->p.flags & MPG123_QUIET)) error("decode_update() has been called before reading the first MPEG frame! Internal programming error."); + + mh->err = MPG123_BAD_DECODER_SETUP; + return MPG123_ERR; + } + + native_rate = frame_freq(mh); + + b = frame_output_format(mh); /* Select the new output format based on given constraints. */ + if(b < 0) return MPG123_ERR; + + if(b == 1) mh->new_format = 1; /* Store for later... */ + + debug3("updating decoder structure with native rate %li and af.rate %li (new format: %i)", native_rate, mh->af.rate, mh->new_format); + if(mh->af.rate == native_rate) mh->down_sample = 0; + else if(mh->af.rate == native_rate>>1) mh->down_sample = 1; + else if(mh->af.rate == native_rate>>2) mh->down_sample = 2; + else mh->down_sample = 3; /* flexible (fixed) rate */ + switch(mh->down_sample) + { + case 0: + case 1: + case 2: + mh->down_sample_sblimit = SBLIMIT>>(mh->down_sample); + /* With downsampling I get less samples per frame */ + mh->outblock = samples_to_storage(mh, (spf(mh)>>mh->down_sample)); + break; +#ifndef NO_NTOM + case 3: + { + if(synth_ntom_set_step(mh) != 0) return -1; + if(frame_freq(mh) > mh->af.rate) + { + mh->down_sample_sblimit = SBLIMIT * mh->af.rate; + mh->down_sample_sblimit /= frame_freq(mh); + } + else mh->down_sample_sblimit = SBLIMIT; + mh->outblock = samples_to_storage(mh, + ( ( NTOM_MUL-1+spf(mh) + * (((size_t)NTOM_MUL*mh->af.rate)/frame_freq(mh)) + )/NTOM_MUL )); + } + break; +#endif + } + + if(!(mh->p.flags & MPG123_FORCE_MONO)) + { + if(mh->af.channels == 1) mh->single = SINGLE_MIX; + else mh->single = SINGLE_STEREO; + } + else mh->single = (mh->p.flags & MPG123_FORCE_MONO)-1; + if(set_synth_functions(mh) != 0) return -1;; + + /* The needed size of output buffer may have changed. */ + if(frame_outbuffer(mh) != MPG123_OK) return -1; + + do_rva(mh); + debug3("done updating decoder structure with native rate %li and af.rate %li and down_sample %i", frame_freq(mh), mh->af.rate, mh->down_sample); + + return 0; +} + +size_t attribute_align_arg mpg123_safe_buffer(void) +{ + /* real is the largest possible output (it's 32bit float, 32bit int or 64bit double). */ + return sizeof(real)*2*1152*NTOM_MAX; +} + +size_t attribute_align_arg mpg123_outblock(mpg123_handle *mh) +{ + /* Try to be helpful and never return zero output block size. */ + if(mh != NULL && mh->outblock > 0) return mh->outblock; + else return mpg123_safe_buffer(); +} + +/* Read in the next frame we actually want for decoding. + This includes skipping/ignoring frames, in additon to skipping junk in the parser. */ +static int get_next_frame(mpg123_handle *mh) +{ + /* We have some decoder ready, if the desired decoder has changed, + it is OK to use the old one for ignoring frames and activating + the new one for real (decode_update()) after getting the frame. */ + int change = mh->decoder_change; + do + { + int b; + /* Decode & discard some frame(s) before beginning. */ + if(mh->to_ignore && mh->num < mh->firstframe && mh->num >= mh->ignoreframe) + { + debug1("ignoring frame %li", (long)mh->num); + /* Decoder structure must be current! decode_update has been called before... */ + (mh->do_layer)(mh); mh->buffer.fill = 0; +#ifndef NO_NTOM + /* The ignored decoding may have failed. Make sure ntom stays consistent. */ + if(mh->down_sample == 3) ntom_set_ntom(mh, mh->num+1); +#endif + mh->to_ignore = mh->to_decode = FALSE; + } + /* Read new frame data; possibly breaking out here for MPG123_NEED_MORE. */ + debug("read frame"); + mh->to_decode = FALSE; + b = read_frame(mh); /* That sets to_decode only if a full frame was read. */ + debug4("read of frame %li returned %i (to_decode=%i) at sample %li", (long)mh->num, b, mh->to_decode, (long)mpg123_tell(mh)); + if(b == MPG123_NEED_MORE) return MPG123_NEED_MORE; /* need another call with data */ + else if(b <= 0) + { + /* More sophisticated error control? */ + if(b==0 || (mh->rdat.filelen >= 0 && mh->rdat.filepos == mh->rdat.filelen)) + { /* We simply reached the end. */ + mh->track_frames = mh->num + 1; + debug("What about updating/checking gapless sample count here?"); + return MPG123_DONE; + } + else return MPG123_ERR; /* Some real error. */ + } + /* Now, there should be new data to decode ... and also possibly new stream properties */ + if(mh->header_change > 1) + { + debug("big header change"); + change = 1; + } + /* Now some accounting: Look at the numbers and decide if we want this frame. */ + ++mh->playnum; + /* Plain skipping without decoding, only when frame is not ignored on next cycle. */ + if(mh->num < mh->firstframe || (mh->p.doublespeed && (mh->playnum % mh->p.doublespeed))) + { + if(!(mh->to_ignore && mh->num < mh->firstframe && mh->num >= mh->ignoreframe)) + { + frame_skip(mh); + /* Should one fix NtoM here or not? + It is not work the trouble for doublespeed, but what with leading frames? */ + } + } + /* Or, we are finally done and have a new frame. */ + else break; + } while(1); + + /* If we reach this point, we got a new frame ready to be decoded. + All other situations resulted in returns from the loop. */ + if(change) + { + if(decode_update(mh) < 0) /* dito... */ + return MPG123_ERR; + +debug1("new format: %i", mh->new_format); + + mh->decoder_change = 0; + if(mh->fresh) + { +#ifdef GAPLESS + int b=0; + /* Prepare offsets for gapless decoding. */ + debug1("preparing gapless stuff with native rate %li", frame_freq(mh)); + frame_gapless_realinit(mh); + frame_set_frameseek(mh, mh->num); +#endif + mh->fresh = 0; +#ifdef GAPLESS + /* Could this possibly happen? With a real big gapless offset... */ + if(mh->num < mh->firstframe) b = get_next_frame(mh); + if(b < 0) return b; /* Could be error, need for more, new format... */ +#endif + } + } + return MPG123_OK; +} + +/* Assumption: A buffer full of zero samples can be constructed by repetition of this byte. + Oh, and it handles some format conversion. + Only to be used by decode_the_frame() ... */ +static int zero_byte(mpg123_handle *fr) +{ +#ifndef NO_8BIT + return fr->af.encoding & MPG123_ENC_8 ? fr->conv16to8[0] : 0; +#else + return 0; /* All normal signed formats have the zero here (even in byte form -- that may be an assumption for your funny machine...). */ +#endif +} + +/* + Not part of the api. This just decodes the frame and fills missing bits with zeroes. + There can be frames that are broken and thus make do_layer() fail. +*/ +static void decode_the_frame(mpg123_handle *fr) +{ + size_t needed_bytes = samples_to_storage(fr, frame_expect_outsamples(fr)); + fr->clip += (fr->do_layer)(fr); + /*fprintf(stderr, "frame %"OFF_P": got %"SIZE_P" / %"SIZE_P"\n", fr->num,(size_p)fr->buffer.fill, (size_p)needed_bytes);*/ + /* There could be less data than promised. + Also, then debugging, we look out for coding errors that could result in _more_ data than expected. */ +#ifdef DEBUG + if(fr->buffer.fill != needed_bytes) + { +#endif + if(fr->buffer.fill < needed_bytes) + { + if(VERBOSE2) + fprintf(stderr, "Note: broken frame %li, filling up with %"SIZE_P" zeroes, from %"SIZE_P"\n", (long)fr->num, (size_p)(needed_bytes-fr->buffer.fill), (size_p)fr->buffer.fill); + + /* + One could do a loop with individual samples instead... but zero is zero + Actually, that is wrong: zero is mostly a series of null bytes, + but we have funny 8bit formats that have a different opinion on zero... + Unsigned 16 or 32 bit formats are handled later. + */ + memset( fr->buffer.data + fr->buffer.fill, zero_byte(fr), needed_bytes - fr->buffer.fill ); + + fr->buffer.fill = needed_bytes; +#ifndef NO_NTOM + /* ntom_val will be wrong when the decoding wasn't carried out completely */ + ntom_set_ntom(fr, fr->num+1); +#endif + } +#ifdef DEBUG + else + { + if(NOQUIET) + error2("I got _more_ bytes than expected (%"SIZE_P" / %"SIZE_P"), that should not be possible!", (size_p)fr->buffer.fill, (size_p)needed_bytes); + } + } +#endif + postprocess_buffer(fr); +} + +/* + Decode the current frame into the frame structure's buffer, accessible at the location stored in
+ Note: + This API doc is automatically generated from the current development version that you can get via Subversion or as a daily snapshot from http://mpg123.org/snapshot. + There may be differences (additions) compared to the latest stable release. See NEWS.libmpg123 and the overall NEWS file on libmpg123 versions and important changes between them.
+ Let me emphasize that the policy for libmpg123 is to always stay backwards compatible -- only additions are planned (and it's not yet planned to change the plans;-). +